ERROR 145 (HY000):Table '$table' is marked as...解决
?
今天打开系统报错,排查下去,具体是这个错误:
? www.2cto.com ?
ERROR 145 (HY000): Table './cmxt/cm_user_pref' is marked as crashed and should be repaired
?
?解决方法如下:(用此方法修复成功)?
mysql> repair table cmxt.cm_user_pref;
+-------------------+--------+----------+----------+
| Table ? ? ? ? ? ? | Op ? ? | Msg_type | Msg_text |
+-------------------+--------+----------+----------+
| cmxt.cm_user_pref | repair | status ? | OK ? ? ? |
+-------------------+--------+----------+----------+
?
google了一篇排名第一的帖子,解决方法如下:
1
首先需要定位到你的mysql的bin目录,里面包含myisamchk.exe文件的目录
2
./myisamchk -c -r
数据库表MYI文件的路径
3
(例如:/home/
mysql/var/crawlerfeedsky/aaaa.MYI)
4
如果还不行,就-f 强制修复
?
尝试这种解决方法,但是行不通,会报如下的错误:
myisamchk: error: 20 when opening MyISAM-table '../mysql/cmxt/cm_user_pref'
?
不是很理解。但是用上面那种repair table的方法就ok了。
?