我有一个损坏的MySQL MyISAM表。它第一次出现在我的mysql日志中是:
[ERROR] /usr/sbin/mysqld: Table './mydb/mytable' is marked as crashed
and last (automatic?) repair failed然后我在上面运行了CHECK TABLE,在翻滚了一个多小时之后,我得到了以下信息:
+--------------+-------+----------+----------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+--------------+-------+----------+----------------------------------------------------------+
| mydb.mytable | check | warning | Table is marked as crashed and last repair failed |
| mydb.mytable | check | warning | 5 clients are using or haven't closed the table properly |
| mydb.mytable | check | warning | Size of indexfile is: 215237632 Should be: 4096 |
| mydb.mytable | check | error | Record-count is not ok; is 4212263 Should be: 0 |
| mydb.mytable | check | warning | Found 48 deleted space. Should be 0 |
| mydb.mytable | check | warning | Found 1 deleted blocks Should be: 0 |
| mydb.mytable | check | warning | Found 8362327 key parts. Should be: 0 |
| mydb.mytable | check | error | Corrupt |
+--------------+-------+----------+----------------------------------------------------------+这一切是否表明这张桌子走得太远了,无法挽救呢?还是REPAIR TABLE还能工作?或者是否有其他选项可以在不替换数据的情况下修复此表?我首先问,因为这张桌子对我的系统来说是相当大的,我有一种感觉,它将需要一段很长的时间才能知道修理是否有效。
发布于 2014-02-26 04:35:14
无论如何,我继续用REPAIR TABLE,认为如果桌子已经走得太远了,我就没有什么可失去的了。谢天谢地,它成功了!桌子已恢复正常工作。
https://serverfault.com/questions/578318
复制相似问题