yangakw yangakw

mysql/user is marked as crashed

in 代码read (260) 文章转载请注明来源!

准备启动mysql时发现出错了。
MySQL manager or server PID file could not be found! [FAILED]
Starting MySQL…………………………….. [FAILED]
以为是selinux的问题,于是setenforce 0 之后再启动,发现还是出错。
查询 /var/lib/mysql/hostname.err 提示如下:
070130 17:59:41 mysqld started
070130 17:59:42 [ERROR] /usr/sbin/mysqld: Table ‘./mysql/user’ is marked as crashed and should be repaired
070130 17:59:42 [ERROR] /usr/sbin/mysqld: Table ‘./mysql/user’ is marked as crashed and should be repaired
070130 17:59:42 [ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘./mysql/user’ is marked as crashed and should be repaired
070130 17:59:42 mysqld ended
搜索后发现可以通过 以下办法解决:
先加上启动参数
service mysql start –skip-grant-tables
Starting MySQL [ OK ]
启动成功后
就可以进行修复 mysql/user 表了,
root@iplaylinux [/var/lib/mysql/mysql]# mysqlcheck -r mysql user
mysql.user
warning : Number of rows changed from 1558 to 1556
status : OK
修复完毕,重启mysql
root@iplaylinux [/var/lib/mysql/mysql]# service mysql restart
Shutting down MySQLs [ OK ]
Starting MySQL [ OK ]

jrotty WeChat Pay

微信打赏

jrotty Alipay

支付宝打赏

文章二维码

扫描二维码,在手机上阅读!

发表新评论
博客已运行
© 2018 yangakw
PREVIOUS NEXT
雷姆
拉姆