【问题描述】
使用
service mysqld start
启动mysql服务失败,提示
Starting MySQL. ERROR! The server quit without updating PID file
【解决方案】
在my.cnf配置文件中的 [mysqld_safe] 下添加
log-error = /apps/logs/mysql/error.log # 表示mysql服务启动日志文件的位置,路径可以根据自己的系统更改
之后再次启动mysql服务,查看error.log文件,注意error标签的提示内容,修改相应的错误。
2018.12.12 更新
可能会在error.log中遇到如下错误
The error means the system cannot find the path specified......
【解决方案】
编辑my.cnf文件,添加一下内容:
innodb_force_recovery=1
重启mysql