遇到的问题:
mysqldump: Error 1194: Table 'user' is marked as crashed and should be repaired when dumping table `user` at row: 1161435
登陆到数据库:
mysql> select count(*) from user;
+----------+
| count(*) |
+----------+
| 1840589 |
+----------+
1 row in set (0.00 sec)
mysql> repair table user;
+--------------+--------+----------+------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+--------------+--------+----------+------------------------------------------------+
| txtotal.user | repair | warning | Number of rows changed from 1840589 to 1161435 |
| txtotal.user | repair | status | OK |
+--------------+--------+----------+------------------------------------------------+
2 rows in set (50.04 sec)
mysql> select count(*) from user;
+----------+
| count(*) |
+----------+
| 1161435 |
+----------+
1 row in set (0.20 sec)
mysql> check table user;
+--------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+--------------+-------+----------+----------+
| txtotal.user | check | status | OK |
+--------------+-------+----------+----------+
1 row in set (15.05 sec)
数据表已经修复完成,只是记录从原来的1840589 条减少到了1161435 条,不是太清楚还有没有更好的方法去实现修复。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/38871/showart_1996523.html