Mysql启动出现MySQL server PID file could not be found 错误

服务器重启了一下,mysql启动时出现:

#/etc/init.d/mysqld restart
ERROR! MySQL PID file could not be found!
Starting MySQL................................... ERROR!

此时如果ps看下,会发现mysql已有进程占用
#ps -ef|grep mysql
解决办法:
#ps -ef |grep mysql|awk '{print $2}'|xargs kill -9
之后重启mysql,一切正常。

具体原因不知,各位遇到时,不妨先分析下下/var/mysql/log/xxx.err日志文件

原文地址:https://www.cnblogs.com/fanglin/p/2526083.html