MYSQL is marked as crashed and should be repaired解决办法
本文章总结了关于MYSQL is marked as crashed and should be repaired解决办法,有需要的朋友可参考一下。
问题分析
错误产生原因,有网友说是频繁查询和更新[数据表]表造成的索引错误,因为我的页面没有静态生成,而是动态页面,因此比较同意这种说法。还有说法为是MYSQL数据库因为某种原因而受到了损坏,如:数据库服务器突发性的断电、在提在数据库表提供服务时对表的原文件进行某种操作都有可能导致MYSQL数据库表被损坏而无法读取数据。总之就是因为某些不可测的问题造成表的损坏。
解决办法
修复如下在你的mysql/bin下面找到myisamchk
在命令行中输入:
代码如下 | 复制代码 |
myisamchk -c -r d:mysqldataabc.MYI |
即可:)
国外参考
myisamchk
/etc/init.d/mysql stopDann kann man sich mit dem Brachial-Tool ans Werk machen:
hist-web:/var/lib/mysql/wsu# myisamchk smt_stats.MYI
Checking MyISAM file: smt_stats.MYI
Data records: 139144 Deleted blocks: 0
myisamchk: warning: Table is marked as crashed
- check file-size
myisamchk: error: Size of datafile is: 10473472 Should be: 10473480
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
myisamchk: error: Found 139145 keys of 139144
- check record links
myisamchk: error: Recordlink that points outside datafile at 10473420
MyISAM-table 'smt_stats.MYI' is corrupted
Fix it using switch "-r" or "-o"Ich tat, wie mir befohlen wurde:
hist-web:/var/lib/mysql/wsu# myisamchk -r smt_stats.MYI
- recovering (with sort) MyISAM-table 'smt_stats.MYI'
Data records: 139144
- Fixing index 1
Found block that points outside data file at 10473420Zur Sicherheit überprüfte ich die Tabelle erneut:
hist-web:/var/lib/mysql/wsu# myisamchk smt_stats.MYI
Checking MyISAM file: smt_stats.MYI
Data records: 139144 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 linksDa alles wieder rosig aussah, konnte man MySQL wieder hochfahren:
/etc/init.d/mysql start
上一篇: jquery聚焦文本框与扩展文本框聚焦方法_jquery
下一篇: JS实现数组去重复值的方法示例
推荐阅读
-
Table ‘xxx’ is marked as crashed and should be repaired 错误解决方法参考
-
MySql is marked as crashed and should be repaired问题
-
mysql错误:……is marked as crashed and should be_MySQL
-
优化表后出现了is marked as crashed and last (automatic?) repair failed解决办法
-
Table'./mysql/user'is marked as crashed and should be repa_MySQL
-
mysql table is marked as crashed and last (automatic?) repai
-
MYSQL is marked as crashed and should be repaired解决办法
-
mysql错误:Table XXX is marked as crashed and should be repai
-
mysql table is marked as crashed and last (automatic?) repai
-
速解决MySQL “is marked as crashed and should be repaired”故障