ERROR 145 (HY000):Table '$table' is marked as...解决_MySQL
ERROR 145 (HY000):Table '$table' is marked as...解决
今天打开系统报错,排查下去,具体是这个错误:
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了。
bitsCN.com
推荐阅读
-
ERROR 126 (HY000): Incorrect key file for table '/tmp/#sql__MySQL
-
【mysql解决方案】ERROR 1248 (42000): Every derived table must have its own alias
-
ERROR 145 (HY000):Table '$table' is marked as...解决_MySQL
-
MySQL ERROR 1005 (HY000): Can't create table 'schema_name.ta
-
解决数据库Table 'content_tags' is marked as crashed and sh_MySQL
-
解决数据库Table 'content_tags' is marked as crashed and sh_MySQL
-
MySQL ERROR 1005 (HY000): Can't create table 'schema_name.ta