MYISAM索引文件损坏的修复方法
2008-12-16 13:05:03 来源:WEB开发网使用格式化文件frm重新创建索引文件
mysql> repair table message_ignore USE_FRM;
+-----------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------------+--------+----------+----------+
| notify.message_ignore | repair | status | OK |
+-----------------------+--------+----------+----------+
1 row in set (0.02 sec)
mysql>
mysql> check table message_ignore;
+-----------------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------------+-------+----------+----------+
| notify.message_ignore | check | status | OK |
+-----------------------+-------+----------+----------+
1 row in set (0.02 sec)
修复后,数据可以正常查询 mysql> select * from message_ignore limit 1;
Empty set (0.00 sec)
如果是格式化文件frm损坏,可以从slave拷贝过来即可,或者从备份中恢复。
更多精彩
赞助商链接