mysql出现“Incorrect key file for table”解决办法
本文来自:
https://www.cnblogs.com/zjoch/archive/2013/08/19/3267131.html
今天mysql突然出现以下错误:
mysql> select * from test;
ERROR 1034 (HY000): Incorrect key file for table ‘test’; try to repair it
首先通过repair table修复:
mysql> repair table test;
+—————+——–+———-+———————————————————+
| Table | Op | Msg_type | Msg_text |
+—————+——–+———-+———————————————————+
| test.test | repair | Error | Incorrect key file for table ‘test’; try to repair it |
| test.test | repair | error | Corrupt
如果还是没用,运行下面命令
mysql> repair table test USE_FRM;
+—————+——–+———-+———————————————————+
| Table | Op | Msg_type | Msg_text |
+—————+——–+———-+———————————————————+
| test.test | repair | Error |Number of rows changed from 0 to 110423 |
| test.test | repair | status | OK
按理应该可以了。
如果还是没用,则退出mysql,执行如下修复动作:
myisamchk -of /var/lib/mysql/test/test.MYI
myisamchk -r /var/lib/mysql/test/test.MYI
myisamchk safe-recover /var/lib/mysql/test/test.MYI
再重启mysql后应该可以正常了。
mysql出现“Incorrect key file for table”解决办法的更多相关文章
- Incorrect key file for table错误解决方法
问题现象: alter table portal_app_xxxx_xxx add devno varchar(64) NOT NULL DEFAULT '' COMMENT '设备机编',add s ...
- MySQL表损坏修复【Incorrect key file for table】
今天机房mysql服务器异常关机,重新启动后报错如下: -- :: [ERROR] /usr/local/mysql/bin/mysqld: Incorrect key file for table ...
- mysql中大数据表alter增加字段报错:"1034 Incorrect key file for table 'table_name'; try to repair it"
mysql中大数据表alter增加字段报错:"1034 Incorrect key file for table 'table_name'; try to repair it" 现 ...
- mysql错误(Incorrect key file for table)
Incorrect key file for table 'C:\Windows\TEMP\#sql578_6e2_68d.MYI'; try to repair it mysql错误:mysql需要 ...
- java.sql.SQLException: Incorrect key file for table 'C:\Windows\TEMP\#sql578_6e2_68d.MYI'; try to repair it
java.sql.SQLException: Incorrect key file for table 'C:\Windows\TEMP\#sql578_6e2_68d.MYI'; try to re ...
- mysqld: Incorrect key file for table
错误 140624 0:53:42 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './xx/xxx.MYI'; try to r ...
- MyISAM引擎表出现“Error 'Incorrect key file for table”
mysql主从复制中的从库突然出现了警报,sql_thread停止了,show slave status\G;查看 mysql> show slave status\G ; . row **** ...
- 数据表损坏:Incorrect key file for table
最近做项目过程中,调用数据库内容,老是出现一些类似于数据表损坏的提示信息(Incorrect key file for table edison_category),查询不到数据,很是恼火,后来冷静下 ...
- 执行查询报: Incorrect key file for table ‘test’; try to repair it
报错信息如下:程序没有错误,但执行会报错,错误定在执行语句上 查了一下资料 网上的解决办法,亲试可用: mysql> use news;Database changedmysql> rep ...
随机推荐
- HUE安装过程中的一些坑
1. gcc: error: krb5-config:: No such file or directory 执行安装krb5-devel yum provides krb5-config 得到提示: ...
- php中获取当前时间
因为php种有时区的设置,默认与我们这边差8小时:所以我们直接使用data方法的话,得到的时间是不准确的 所以我们在开头设置时区 //设置时区的方法: date_default_timezone_se ...
- 7.6.2 break 语句
7.6.2 break 语句 程序执行到循环中的break语句时,会种植包含它的循环,并继续执行下一阶段. 如果break语句位于嵌套循环内,它只会影响包含它的当前循环. break还可用于因其他原因 ...
- python之路——22
学习内容 1.初识面向对象 类:抽象的,模子 对象:具体的,根据类规范 代码精简,修改方便,属性规范2.对象 查看属性 调用方法 __dict__,增删改查,通过字典语法进行3.类名 1.实例化 2. ...
- 2018-2019-2 20165312《网络攻防技术》Exp2 后门原理与实践
2018-2019-2 20165312<网络攻防技术>Exp2 后门原理与实践 课上知识点梳理总结 1.后门的概述 后门是指不经过正常认证流程而访问系统的通道 两个关键词:未认证.隐通道 ...
- GSM与GPRS的区别
1. GSM是全球移动通讯系统(Global System for Mobile Communications)的简称 2. GPRS是通用分组无线业务(General Packet Ra ...
- 给datagridview的下拉框添加valueChange事件
修改datagridview的EditMode属性为EdutOnEnter,否则需要点2次以上才出现下拉框 1.给DataGridView添加EditingControlShowing事件: 2.编辑 ...
- 用kickstart创建逻辑卷管理LVM分区
创建两个物理分区分别给Boot和Swap分区,剩余的空间作LVM. Partition Size Name------------------------------/boot ...
- 闪动效果的实现 (jquery方式和css方式)以及 keyframes和opacity 与ie等各浏览器兼容问题
opacity 是CSS3中:设置元素的不透明度的属性(支持ie8以上) opacity: value|inherit;value用于规定不透明度.从 0.0 (完全透明)到 1.0(完全不透明). ...
- JavaScript数组方法--includes、indexOf、lastIndexOf
我们继续吧! includes:includes() 方法用来判断一个数组是否包含一个指定的值,根据情况,如果包含则返回 true,否则返回false.还是先看看includes的用法吧 var ar ...