本来运行得好好的程序,没有人修改,突然报MYSQL查询错误。到PM里面手动执行一下SQL语句,发现错误提示:

Incorrect key file for table ‘.\xx\xxx.MYI’; try to repair it

提示一张日志表损坏,需要修复。
停掉相关服务:

1
2
net stop Apache2.2
net stop MySQL

冷备数据库后,执行check table xxxrepair table xxx修复表后恢复正常。

 

转自:http://ihacklog.com/post/incorrect-key-file-for-table-xxxxx-myi-try-to-repair-it-solution.html