ITPub博客

首页 > 数据库 > MySQL > MySQL server PID file could not be found!

MySQL server PID file could not be found!

原创 MySQL 作者:634828354 时间:2017-08-01 13:32:56 0 删除 编辑
root@s1 Downloads]# service mysql restart
MySQL server PID file could not be found!                  [FAILED]

[root@s1 Downloads]# service mysql stop
MySQL server PID file could not be found!                  [FAILED]

解决方法:
1.通过ss -tnl命令查看服务
[root@s1 Downloads]# ss -tnl
State       Recv-Q Send-Q   Local Address:Port   Peer Address:Port
LISTEN      0      50               *:3306                 *:* 

2,停止mysql服务
[root@s1 Downloads]# killall mysqld

3.重启mysql服务

4.发现mysql数据目录权限异常
[root@s1 Downloads]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

5.修改mysql数据目录权限
[root@s1 Downloads]# chown -R mysql.mysql /var/lib/mysql/

6.重启服务,即可以正常登陆mysql




来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30046312/viewspace-2142901/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-12-01

  • 博文量
    47
  • 访问量
    96786