首页 > 代码库 > myisam表修复
myisam表修复
数据库myisam引擎表损坏修复步骤:
1.进入到表目录文件下
# myisamchk -of comments.MYI
2.
# myisamchk -of comments.MYI
2.
# myisamchk -r comments.MYI
3.
3.
# myisamchk comments.MYI
4.进入数据库库中
mysql> repair table cms.comments ;
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 | 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)
| Table | Op | Msg_type | Msg_text |
+--------------+-------+----------+----------+
| cms.comments | check | status | OK |
+--------------+-------+----------+----------+
1 row in set (0.98 sec)
--完结--屡试不爽--
myisam表修复
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。