錯誤提示:
ERROR 126 (HY000): Incorrect key file for table '.\datadb\cdee.MYI'; try to repair it
可以看出cdee這個表損壞了
進行數據表修復,進入到這個表所在的庫:repair table cdee
mysql> REPAIR TABLE cdee;
+------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+------------------+--------+----------+----------+
| datadb.cdee| repair | status | OK |
+------------------+--------+----------+----------+
Msg_text的值爲OK即搞掂了
網上也有說如果報錯Can’t open file: ‘[Table]cdee.MYI’之類的
repair table 這個命令卻不行了
如果報這個錯誤可以使用此命令:repair table cde use_frm
這個命令沒試過,不過有同行嘗試是ok的