数据库报错”ERROR! MySQL server PID file could not be found!”

今天看到有一个客户找解决问题,因为他在处理数据库的时候有启动不了,然后看到报错”ERROR! MySQL server PID file could not be found!”。

[root@VM-0-5-centos ~]# /etc/init.d/mysqld restart
ERROR! MySQL server PID file could not be found!
Starting MySQL…. ERROR! The server quit without updating PID file (/www/server/data/VM-0-5-centos.pid).

问题是:

MySQL日志文件找不到或者损坏。

我们在处理之前最好先快照备份。

/etc/init.d/mysqld stop 
rm -f /www/server/data/ib_logfile* 
rm -f /www/server/data/mysql-bin.* 
/etc/init.d/mysqld start

试试看是不是已经解决。


【AD】丽萨主机英国VPS推荐 英国原生IP双ISP家宅主机

【AD】美国洛杉矶/香港/日本VPS推荐,回程电信CN2 GIA线路,延迟低、稳定性高、免费备份_搬瓦工