myisam表修复

 数据库myisam引擎表损坏修复步骤:
 
1.进入到表目录文件下
# myisamchk -of comments.MYI
2.
# myisamchk -r  comments.MYI
3.
# myisamchk comments.MYI
4.进入数据库库中
mysql> repair table cms.comments ;
 
mysql> repair table cms.comments ;
+--------------+--------+----------+-------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+--------------+--------+----------+-------------------------------------------------+
| cms.comments | repair | info | Wrong bytesec: 0- 0- 0 at 69690360; Skipped |
| cms.comments | repair | warning | Number of rows changed from 578565 to 578564 |
| cms.comments | repair | status | OK |
+--------------+--------+----------+-------------------------------------------------+
3 rows in set (2.98 sec)

mysql>check tabl cms.comments ;
+--------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+--------------+-------+----------+----------+
| cms.comments | check | status | OK |
+--------------+-------+----------+----------+
1 row in set (0.98 sec)
 
--完结--屡试不爽-- 
 
原文地址:https://www.cnblogs.com/cuisi/p/6549832.html