Chinaunix首页 | 论坛 | 博客
  • 博客访问: 488526
  • 博文数量: 99
  • 博客积分: 3621
  • 博客等级: 中校
  • 技术积分: 1089
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-22 16:29
文章存档

2012年(21)

2011年(28)

2010年(50)

分类: Mysql/postgreSQL

2010-12-08 12:37:55

今天启动本机的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服务,一切正常了。
阅读(863) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~