今天启动本机的MYSQL,提示无法连接,到错误日志查看,发现如下错误信息,提示mysql的user表需要修复
101207 9:01:34 [ERROR] mysql5.1: Table '.\mysql\user' is marked as crashed and should be repaired 101207 9:01:34 [ERROR] Fatal error: Can't open and lock privilege tables: Table '.\mysql\user' is marked as crashed and should be repaired 101208 9:06:09 [Note] Plugin 'FEDERATED' is disabled. 101208 9:06:36 InnoDB: Started; log sequence number 1 2521952794 101208 9:06:36 [Note] Recovering after a crash using mysql 101208 9:06:36 [Note] Starting crash recovery... 101208 9:06:36 [Note] Crash recovery finished. 101208 9:06:38 [ERROR] mysql5.1: Table '.\mysql\user' is marked as crashed and should be repaired 101208 9:06:38 [ERROR] Fatal error: Can't open and lock privilege tables: Table '.\mysql\user' is marked as crashed and should be repaired
|
于是用myisamchk进行修复
D:\mysql6\bin>myisamchk -r d:\mysql6\data\mysql\*.MYI - recovering (with sort) MyISAM-table 'd:\mysql6\data\mysql\columns_priv.MYI' Data records: 0 - Fixing index 1
---------
|
修复完成后,再启动MYSQL服务,一切正常了。
阅读(877) | 评论(0) | 转发(0) |