mysql 报错'./ivr/T_CDR' is marked as crashed and should be repaired when doing LOCK TABLES(示例代
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql 报错'./ivr/T_CDR' is marked as crashed and should be repaired when doing LOCK TABLES(示例代相关的知识,希望对你有一定的参考价值。
出现这种情况应该是在跑业务的时候,mysql数据库异常中断导致表异常,查看mysql日志报错如下
[[email protected] 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(示例代的主要内容,如果未能解决你的问题,请参考以下文章
MySQL 报错ERROR 1054 (42S22): Unknown column 'plugin' in 'mysql.user'
Mysql报错Forcing close of thread 139 user: 'root'
Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't
docker启动mysql报错Can't read dir of '/etc/mysql/conf.d/'
解决MySQL8.0报错:Unknown system variable 'validate_password_policy'