宝塔下MySQL启动报错修复

2021-05-12T11:30:00

原因:

服务器强制重启导致MySQL无法启动报错信息为:

The server quit without updating PID file(XXX/XXX.pid)

查看mysql日志报错信息为:

/www/server/mysql/bin/mysqld: Table './mysql/db' is marked as crashed and should be repaired

Fatal error: Can't open and lock privilege tables: Table './mysql/db' is marked as crashed and should be repaired

修复方法:

5.6版本的数据库为:

myisamchk -rf /www/server/data/mysql/db

其他版本的数据库为:

myisamchk -rf /www/server/data/mysql/db.MYI
当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »