首页 > 代码库 > mysql 报错'./ivr/T_CDR' is marked as crashed and should be repaired when doing LOCK TABLES
mysql 报错'./ivr/T_CDR' is marked as crashed and should be repaired when doing LOCK TABLES
出现这种情况应该是在跑业务的时候,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 repaired16082713:29:40[ERROR]/usr/libexec/mysqld:Table‘./ivr/T_CDR‘ is marked as crashed and should be repaired16082713:29:40[ERROR]/usr/libexec/mysqld:Table‘./ivr/T_CDR‘ is marked as crashed and should be repaired16082713:32:40[ERROR]/usr/libexec/mysqld:Table‘./ivr/T_CDR‘ is marked as crashed and should be repaired16082713: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/ivrmyisamchk -f T_CDR.MYI
来自为知笔记(Wiz)
mysql 报错'./ivr/T_CDR' is marked as crashed and should be repaired when doing LOCK TABLES
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。