mysql报错1194_ERROR 1194 (HY000): Table 't1' is marked as crashed and should be repaired
今天测试mysql,发现一个表出现了以下报错
ERROR 1194 (HY000): Table 't1' is marked as crashed and should be repaired
在网上搜有些说需要通下面方法进行修复
[root@localhost data]# myisamchk -f ./test2/*.MYI
Checking MyISAM file: ./test2/t1.MYI
Data records: 24926 Deleted blocks: 0
- check file-size
myisamchk: error: Size of datafile is: 73 Should be: 174482
- recovering (with keycache) MyISAM-table './test2/t1.MYI'
Data records: 24926
Data records: 5
---------
Checking MyISAM file: ./test2/t2.MYI
Data records: 482688 Deleted blocks: 0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
- check record links
---------
Checking MyISAM file: ./test2/t4.MYI
Data records: 482688 Deleted blocks: 0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
---------
Checking MyISAM file: ./test2/t5.MYI
Data records: 482688 Deleted blocks: 0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check record links
然后在mysql 里使用repair中进行修复,成功。
mysql> repair table cmxt.cm_user_pref;
+-------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-------------------+--------+----------+----------+
| cmxt.cm_user_pref | repair | status | OK |
+-------------------+--------+----------+----------+
后来经过实验发现
首先检查check table t1
mysql> check table t1;
+----------+-------+----------+---------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+----------+-------+----------+---------------------------------------------------+
| test2.t1 | check | error | Size of datafile is: 73 Should be: 174482 |
| test2.t1 | check | error | Corrupt |
+----------+-------+----------+---------------------------------------------------+
2 rows in set (0.00 sec)
然后再使用myisamchk来修复
[root@localhost mysql]# myisamchk -f ./data/test2/t1.MYI
Checking MyISAM file: ./data/test2/t1.MYI
Data records: 24926 Deleted blocks: 0
myisamchk: warning: Table is marked as crashed
- check file-size
myisamchk: error: Size of datafile is: 73 Should be: 174482
- recovering (with keycache) MyISAM-table './data/test2/t1.MYI'
Data records: 24926
Data records: 5
然后再查看t1表
mysql> select * from t1; +-------------+ | str_number | +-------------+ | NULL | | NULL | | -1774844896 | | NULL | | NULL | +-------------+ 5 rows in set (0.00 sec)
mysql报错1194_ERROR 1194 (HY000): Table 't1' is marked as crashed and should be repaired相关推荐
- mysql报错-ERROR 1206 (HY000)- The total number of locks exceeds the lock table size-的解决方法
mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法 问题 ...
- 解决MySQL报错ERROR 2002 (HY000)【转】
今天在为新的业务线搭架数据库后,在启动的时候报错 root@qsbilldatahis-db01:/usr/local/mysql/bin# ./mysql ERROR 2002 (HY000): C ...
- 解决MySQL报错ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘ (10061)
解决MySQL报错ERROR 2003 HY000: Can't connect to MySQL server on 'localhost:3306' 10061 笔者在新电脑安装完 MySQL ...
- 解决MySQL报错ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
解决MySQL报错ERROR 2003 HY000: Can't connect to MySQL server on 'localhost:3306' 10061 笔者在新电脑安装完 MySQL 后 ...
- 解决mysql Table ‘xxx’ is marked as crashed and should be repaired的问题。
解决mysql Table 'xxx' is marked as crashed and should be repaired的问题. 某个表在进行数据插入和更新时突然出现Table 'xxx' is ...
- mysql table crashed_快速解决MySQL:Table xxx is marked as crashed and should be repaired五个办法...
查看MySQL错误日志看到 Table xxx is marked as crashed and should be repaired 解决办法如下 第一种: 1.首先进入mysql命令台: mys ...
- mysql库提示 Table ‘xxx’ is marked as crashed and should be repaired
公司信息站,机房冷启一次.再次开机后,网站能打开,信息能查,但是个别表出现提示:Table 'xxx' is marked as crashed and should be repaired .且无法 ...
- 解决数据库 Table 'content_tags' is marked as crashed and should be repaired 表损坏问题
今天突然网站TAG页面打不开了,打开debug,发现提示 Table 'content_tags' is marked as crashed and should be repaired 这样的错误 ...
- java.sql.SQLException: Table 'XXX' is marked as crashed and should be repaired异常修复
服务器日志报java.sql.SQLException: Table 'XXX' is marked as crashed and should be repaired异常,下面给出修改方案,经试用可 ...
- mysql报错ERROR 1206 (HY000): The total number of locks exceeds the lock table size的解决方法...
1. 问题背景 InnoDB是新版MySQL(v5.5及以后)默认的存储引擎,之前版本的默认引擎为MyISAM,因此,低于5.5版本的mysql配置文件.my.cnf中,关于InnoD ...
最新文章
- hive常用sql语句
- php基础标签大全,HTML基础之HTML常用标签
- LeetCode 142——环形链表 II
- 11旋转编码器原理_旋转编码器的原理是什么?增量式编码器和绝对式编码器有什么区别?...
- 再议指针和引用的一些事情吧
- Spring Boot 2.0与Java 9
- Swagger介绍及使用
- 面试中如何做一个好的自我介绍?
- 中国人工智能学会通讯——智能系统测评:挑战和机遇
- 【OPTEE开发】从TA到安全驱动的功能设计
- 【ATT】【second】Decode Ways
- linux ios文件是否存在,Linux如何读取iOS镜像文件
- 互联网科普-淘宝与天猫的对标
- linux双系统 引导修复,Linux与windows双系统GRUB引导修复
- VB查询ACCESS数据库内容
- u盘pe安装深度linux系统教程,深度U盘装机大师_深度u盘启动盘安装深度系统
- 【U8】用友U8一张A4纸打印一张凭证设置
- ZYNQ7010 CAN的官方例程改为XCANPS_MODE_NORMAL模式,程序没跑通
- Python实现AI变脸
- 一分钟解决QT官网无法下载的问题