myisam表修复
Posted 缥缈之旅
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了myisam表修复相关的知识,希望对你有一定的参考价值。
数据库myisam引擎表损坏修复步骤:
1.进入到表目录文件下
# myisamchk -of comments.MYI
2.
# myisamchk -of comments.MYI
2.
# myisamchk -r comments.MYI
3.
3.
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表修复的主要内容,如果未能解决你的问题,请参考以下文章
markdown mysql修复Myisam数据表,myisamchk命令进行崩溃恢复
mysql 开发进阶篇系列 34 工具篇 mysqlcheck(MyISAM表维护工具)