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

来自为知笔记(Wiz)

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

时间: 2024-08-09 21:59:32

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

导出Mysql数据库出错:Got error: 145: Table 'wp_options' is marked as crashed and should be repaired when using LOCK TABLES的解决方法

mysqldump: Got error: 145: Table 'wp_options' is marked as crashed and should be repaired when using LOCK TABLES 错误如上所示. 今天在给自己的wp网站搬家的时候,导出数据时发现导不出来,报了如上的错误,在网上找了一下资料,说是这张张被标记有问题,需要优化.参考: http://www.cnblogs.com/hakuci/archive/2012/03/20/2407723.html

REPAIR修复mysql报错is marked as crashed and should be

早上收到报警,数据库报错Table erp_agents is marked as crashed and should be repaired 提示这张表损坏了,需要修复, 于是登录数据库: [email protected]:~# mysql -uroot -p123456 MySQL [(none)]> use zhiliao-20190429; MySQL [(none)]> REPAIR TABLE erp_agents; 原文地址:https://blog.51cto.com/90

Table '' is marked as crashed and should be repaired 解决方法

解决方法: 找到mysql的安装目录的bin/myisamchk工具,在命令行中输入: myisamchk -c -r ../data/mysql/user.MYI 然后myisamchk 工具会帮助你恢复数据表的索引.重新启动mysql,问题解决. Table '' is marked as crashed and should be repaired 解决方法

Table '.\mysql\proc' is marked as crashed and should be repaired 报错

Table '.\MySQL\proc' is marked as crashed and should be repaired 报错 解决方法: 找到mysql的安装目录的bin/myisamchk工具,在命令行中输入: myisamchk -c -r ../data/mysql/proc.MYI 然后myisamchk 工具会帮助你恢复数据表的索引.重新启动mysql,问题解决. Table '.\mysql\proc' is marked as crashed and should be

mysql报错问题解决Character set 'utf8mb4' is not a compiled character set

mysql: Character set 'utf8mb4' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file 报错的解决方法 1.由于日常程序使用了字符集utf8mb4,为了避免每次更新时,set names utf8mb4,就把配置文件改了,如下: 增加了mysql客户端的默认字符集设置 [[email protected]~]# vim

解决mysql报错Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

启动mysql 报错: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 1.先查看 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已经启动.另外看看是不是权限问题. 2.确定你的mysql.sock是不是在那个位置,mysql -u 你的mysql用户名 -p -S /var/lib/mysql/

MySQL报错“1366 - Incorrect integer value: '' XXXXXXX' at row 1 ”

出现这个错误是因为我在表中插入了一条含有中文字符的语句: 修改方法: my.ini中查找sql-mode 将 sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION", 修改为 sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION", 重启mysql后即可 . MySQL报错"1366 - Incorrect int

mysql报错:MySQL server version for the right syntax to use near 'type=InnoDB'

工作中使用sql语句建表时,mysql报了如下错误: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 1 解决方案: 这个报错是由于某些版本的mysql不支持type写法,将type关键词改成ENGINE 即可. 版权声明:本文为博主原

连接mysql报错:error 2003 (hy000):can't connect to mysql server on 'localhost' (10061)

一.mysql 的bin目录下有个MySQLInstanceConfig.exe,运行就可以进行创建数据库实例,创建实例时也可以生成windows 服务,把服务设置成自动启动就可以了 二.安装在D盘的discuzz!打开后出现上述错误,请问应如何处理?winmysqladmin已经启动,但三色树上有一个小红点如果出现"ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)",说明你的MySQL还没有启动.解决办法