exec failed:Table ‘./xxx/xxx_Table‘ is marked as crashed and should be repaired
具体原因我还不是很清楚,搜了下资料,有以下几种说法:
第一步: 备份损坏的表或者数据库
第二步:使用mysql自带的mysqlcheck工具, 加上--auto-repair选项即可修复
mysqlcheck -u root -p password table_name --auto-repair
另外, mysqlcheck还有以下功能: 为了安全起见,以下两种方法不建议在生产环境中使用
mysqlcheck -a -o -r -p //检查优化并修复所有的数据库
mysqlcheck -A -o -r 数据库名称 -p //修复指定的数据库
参数含意:
-a = Analyse given tables. //分析数据表
-c = Check table for errors //检查数据库中错误(损坏)的表
-o = Optimise table //优化数据表
-r = Can fix almost anything except unique keys that aren’t unique // 修复损坏的数据表
-m = –medium-check
解决"is marked as crashed and should be repaired"故障
原文:https://www.cnblogs.com/aabbc6/p/13547510.html