Repair by sorting 或者 Table '*.*' is marked as crashed and last (automatic)

当表出现 Repair by sorting 时可以先登上十几分钟,如果还是没有反应,可以关闭sql语句。

这时候再次执行会出现 Table '*.*' is marked as crashed and last (automatic) 不要慌!

通过mysql命令行来执行

  1、service mysqld stop 停止mysql服务;

  2、cd /var/local/mysql/table 切换到该表目录下(注意:不切换过来会总提示myisamchk一些错误导致失败);

  3、myisamchk -r xxx.MYI (如果还是提示错误,就多加一个参数-f 强制进行。)

  切记一直等待!!!等出现下面的   Data records: 16591794 就说成功了,表就可以操作了

Data records: 6822642
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5
- Fixing index 6
- Fixing index 7
- Fixing index 8
Data records: 16591794

 

posted @ 2020-10-09 18:12  simplelifezp  阅读(561)  评论(0)    收藏  举报