mysql异常关闭导致无法启动问题解决办法

有一次关闭服务器,忘记了先关闭mysql。再次启动mysql报下面错误:

Starting mysqld (via systemctl): Job for mysqld.service failed because the control process exited with error code. See “systemctl status mysqld.service” and “journalctl -xe” for details. [FAILED]

一般是无法创建mysqld.pid导致的。解决步骤如下:

cd /var/run
mkdir mysqld
chown -R mysql:mysql mysqld
service mysqld start

《mysql异常关闭导致无法启动问题解决办法》有一个想法

发表评论

电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.