mysql 启动错误-server PID file could not be found

来源:互联网 发布:淘宝香港代购可靠吗 编辑:程序博客网 时间:2024/06/09 17:18





MySQL server PID file could not be found!                  [FAILED]
Starting MySQL...The server quit without updating PID file [FAILED]b/mysql/localhost.pid).
[root@localhost mysql]# service mysql stop
MySQL server PID file could not be found!                  [FAILED]



解决办法:

首先查看一下进程


[root@localhost mysql]# ps aux |grep mysq*
root      1516  0.0  0.0 108332  1504 ?        S    Sep23   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid
mysql     1793  0.0  2.9 896644 115528 ?       Sl   Sep23   0:30 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/localhost.localdomain.err --pid-file=/var/lib/mysql/localhost.localdomain.pid --socket=/var/lib/mysql/mysql.sock --port=3306
root      7148  0.0  0.0 103248   848 pts/0    S+   02:13   0:00 grep mysq*

如果看到上面的内容,那说明,Mysql的进程卡死了,这时用就要把这些卡死的进程都关闭
[root@localhost mysql]# kill 1516
[root@localhost mysql]# kill 1793

[root@localhost mysql]# ps aux |grep mysq*
root      7158  0.0  0.0 103244   832 pts/0    S+   02:14   0:00 grep mysq*
[root@localhost mysql]# service mysql start
Starting MySQL...                                          [  OK  ]

0 0