解决mysql Table ‘xxx’ is marked as crashed and should be repaired的问题。

解决mysql Table ‘xxx’ is marked as crashed and should be repaired的问题。

某个表在进行数据插入和更新时突然出现Table ‘xxx’ is marked as crashed and should be repaired这个异常,随后整个表无法查询,表数据全部丢失。

解决办法:

切换至mysql bin目录

./myisamchk -c -r 数据库表MYI文件的路径

例如:./myisamchk -c -r /home/mysql/var/data/aaaa.MYI

如果还不行,就-f 强制修复。


你可能感兴趣的:(解决mysql Table ‘xxx’ is marked as crashed and should be repaired的问题。)