码迷,mamicode.com
首页 > 数据库 > 详细

mysql 报错'./ivr/T_CDR' is marked as crashed and should be repaired when doing LOCK TABLES

时间:2016-08-27 15:16:44      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:

出现这种情况应该是在跑业务的时候,mysql数据库异常中断导致表异常,查看mysql日志报错如下

[root@test opt]# tail -n 5/var/log/mysqld.log    
16082713:29:33[ERROR]/usr/libexec/mysqld:Table./ivr/T_CDR is marked as crashed and should be repaired
16082713:29:40[ERROR]/usr/libexec/mysqld:Table./ivr/T_CDR is marked as crashed and should be repaired
16082713:29:40[ERROR]/usr/libexec/mysqld:Table./ivr/T_CDR is marked as crashed and should be repaired
16082713:32:40[ERROR]/usr/libexec/mysqld:Table./ivr/T_CDR is marked as crashed and should be repaired
16082713:32:52[ERROR]/usr/libexec/mysqld:Table./ivr/T_CDR is marked as crashed and should be repaired

 

 

查了一下资料,使用 myisamchk 修复一下表即可,切换到数据库的date目录,执行如下命令将对应表 MYI 文件修复即可

cd /var/lib/mysql/ivr
myisamchk -f T_CDR.MYI
 

 



mysql 报错'./ivr/T_CDR' is marked as crashed and should be repaired when doing LOCK TABLES

标签:

原文地址:http://www.cnblogs.com/stache/p/5812915.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!