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 ...
随机推荐
- java大数据量调优
从总体上来看,对于大型网站,比如门户网站,在面对大量用户访问.高并发请求方面,基本的解决方案集中在这样几个环节:1.首先需要解决网络带宽和Web请求的高并发,需要合理的加大服务器和带宽的投入,并且需要 ...
- python with as的用法
With语句是什么? 有一些任务,可能事先需要设置,事后做清理工作.对于这种场景,Python的with语句提供了一种非常方便的处理方式.一个很好的例子是文件处理,你需要获取一个文件句柄,从文件中读取 ...
- Apartment 2019:(1)创建墙体
墙体建模 The Walls 软件:SketchUp Pro 2017 墙体模型 建模过程: 一.导入图像并调整大小 导入公寓平面参考图/户型图(来自网络),导入为图像.连续三击鼠标左键,选中所有的几 ...
- qnx gpio
in order to set gpio in qnx, you can use msmgpiotool # msmgpiotool gpiotool usage: gpiotool <comm ...
- word 添加文本框
转https://blog.csdn.net/sroco/article/details/17044973 如何在word2013(2007.2010)中添加带滚动条的文本框 2013年11月30日 ...
- 【转录组入门】3:了解fastq测序数据
操作:需要用安装好的sratoolkit把sra文件转换为fastq格式的测序文件,并且用fastqc软件测试测序文件的质量 作业:理解测序reads,GC含量,质量值,接头,index,fastqc ...
- C语言编程漫谈——main函数
写在前面 促使我写这篇文章是因为我这几天找了几个一样是大三的同学,与我相同专业相同方向(物联网)的人,除了@小胡同的诗,基本没有什么其他人会现在看起来很简单的编程题目了.问了一下其他同学,他们大部分都 ...
- Spark RDD 操作
1. Spark RDD 创建操作 1.1 数据集合 parallelize 可以创建一个能够并行操作的RDD.其函数定义如下: ) scala> sc.defaultParallelism ...
- java锁
---恢复内容开始--- synchronized 互斥锁 synchronized(this) 当前类的所有synchronized(this) 都被锁了,还有synchronized static ...
- IntelliJ IDEA 设置背景图片
1.在idea中 按快捷键 Ctrl+Shift+A 出现如图 输入 Set Background Image 双击 Set Background Image 2.选择要添加的图片的路径 ...