ERROR! MySQL is running but PID file could not be found

[root@localhost ~]# /etc/init.d/mysqld status

MySQL is running but PID file could not be found           [失败]

打印MYSQL进程

[root@localhost ~]# ps aux |grep mysql

root      1229  0.0  0.0 108168  1564 ?        S    16:06   0:00 /bin/sh /etc/rc3.d/S64mysqld start
root      1238  0.9  0.0 108616  2052 ?        S    16:06   0:04 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/data/mysqldata --pid-file=/data/mysqldata/localhost.localdomain.pid
mysql    15435 63.0 10.3 4029808 838284 ?      R    16:15   0:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/data/mysqldata --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/data/mysqldata/localhost.localdomain.err --pid-file=/data/mysqldata/localhost.localdomain.pid --socket=/tmp/mysql.sock --port=3306

root     15438  0.0  0.0 103248   844 pts/1    D+   16:15   0:00 grep mysql

KILL进程

[root@localhost ~]# kill -9 1229
[root@localhost ~]# kill -9 1238
[root@localhost ~]# ps aux |grep mysql
root     16671  0.0  0.0 103248   880 pts/1    S+   16:15   0:00 grep mysql
[root@localhost ~]# 
[root@localhost ~]# /etc/init.d/mysqld status

MySQL is not running                                       [失败]

[root@localhost ~]# /etc/init.d/mysqld start

其他的错误可以在日志里查看到
Centos mysql的日志
在/var/lib/mysql/主机头名称xxx.err

你可能感兴趣的:(ERROR! MySQL is running but PID file could not be found)