mysql故障(程序正在运行却找不到PID文件)

[root@slave ~]# /etc/init.d/mysql status
ERROR! MySQL is running but PID file could not be found

[root@slave ~]# ps aux|grep mysql
root       1145  0.1  0.2 108432  1320 ?        S    13:41   0:01 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/mysql/data --pid-file=/mysql/data/slave.pid
root      10917  0.0  0.1 103252   832 pts/0    S+   13:51   0:00 grep mysql
root      10918  0.0  0.1 108432   700 ?        S    13:51   0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/mysql/data --pid-file=/mysql/data/slave.pid
root      10921  0.0  0.1 103252   836 ?        S    13:51   0:00 grep /usr/local/mysql/bin/mysqld>
root      10922  0.0  0.1 103252   840 ?        S    13:51   0:00 grep -c pid-file=/mysql/data/slave.pid
[root@slave ~]# kill  -9 1145

[root@slave ~]# /etc/init.d/mysql restart
ERROR! MySQL server process #11890 is not running!
Starting MySQL... SUCCESS!
[root@slave ~]# /etc/init.d/mysql status
SUCCESS! MySQL running (12312)

 
原文地址:https://www.cnblogs.com/benjamin77/p/8533528.html