【发布时间】:2009-06-22 13:04:10
【问题描述】:
Incorrect key file for table 'widgets'; try to repair it
这是 MySQL 在尝试将新索引应用于现有(非常大)表时给我的错误消息。当然,当我按照错误消息的建议尝试修复它时:
mysql> repair table widgets;
+-------------------+--------+----------+---------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-------------------+--------+----------+---------------------------------------------------------+
| tedsdb.widgets | repair | note | The storage engine for the table doesn't support repair |
+-------------------+--------+----------+---------------------------------------------------------+
1 row in set (0.00 sec)
我最好的做法是什么(在修补之前明显的完整备份之后)?
更新:我创建了一个相同模式的新表(MyISAM),复制了所有记录(插入到选择中),更改了新表(InnoDB)上的引擎,重命名了损坏表并重命名新表,然后再次尝试并得到相同的错误。
【问题讨论】:
标签: mysql mysql-error-126