Home > Database > Mysql Tutorial > ERROR 145 (HY000):Table '$table' is marked as...解决_MySQL

ERROR 145 (HY000):Table '$table' is marked as...解决_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:38:10
Original
5074 people have browsed it

bitsCN.com


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
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template