Table 'xxx'is marked as crashed and last (automatic) repair failed

逃离我推掉我的手 2021-06-24 14:35 404阅读 0赞

Table ‘xxx’is marked as crashed and last (automatic) repair failed。这意味着该表被标记为跌宕了。于是想着修复:repair table arvhives,修复却失败了。

  只好通过mysql命令行来执行了。

  1)service mysqld stop 停止mysql服务;

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

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

  1. [root@localhost tjinfo]# myisamchk -r dede_archives.MYI
  2. - recovering (with sort) MyISAM-table 'dede_archives.MYI'
  3. Data records: 1781
  4. - Fixing index 1
  5. - Fixing index 2
  6. - Fixing index 3
  7. - Fixing index 4

最后查看,成功!

注意:虽然这样成功了,但是当你再次添加文章的时候,又会出现这样的问题,所以长久的解决办法如下:
把服务器上的数据导入到本地,然后在本地用myisamchk -r -f *.MYI修复了下,然后导回去。

发表评论

表情:
评论列表 (有 0 条评论,404人围观)

还没有评论,来说两句吧...

相关阅读