mysql无法启动ERROR! MySQL is running but PID file could not be found ?

转载于:http://blog.csdn.net/wuzhilon88/article/details/17616635

第一种方法:可能是硬盘满了,清理下垃圾文件。

第二种:

查看下数据库运行状态

 /etc/init.d/mysql status
提示
ERROR! MySQL is running but PID file could not be found
先打印MYSQL进程
ps aux | grep mysql
然后KILL进程
kill -9 pid1 pid2 …
再启动MYSQL
/etc/init.d/mysql start
再检查mysql运行状态
/etc/init.d/mysql status

提示成功

第三种:是修改过my.cnf配置出错引起 执行命令:vi /etc/my.cnf  修改内容:

# The MySQL server
    [mysqld]
    port   = 3306
   socket  = /var/lib/mysql/mysql.sock

在执行第二种命令,OK

原文地址:https://www.cnblogs.com/zl0372/p/mysql_pid.html