mysql碰到一个奇怪的问题,执行查询没有语法错误,但是抛异常:
java.sql.SQLException: Got error 134 from storage engine
错误原因
Even though the MyISAM table format is very reliable (all changes to a table made by an SQL statement are written before the statement returns), you can still get corrupted tables if any of the following events occur:
-
The mysqld process is killed in the middle of a write.
-
An unexpected computer shutdown occurs (for example, the computer is turned off).
-
Hardware failures.
-
You are using an external program (such as myisamchk ) to modify a table that is being modified by the server at the same time.
-
A software bug in the MySQL or
MyISAMcode.
Typical symptoms of a corrupt table are:
-
You get the following error while selecting data from the table:
Incorrect key file for table: '...'. Try to repair it
-
Queries don't find rows in the table or return incomplete results.
来自:
http://dev.mysql.com/doc/refman/5.0/en/corrupted-myisam-tables.html
解决:
CHECK TABLE 表名
REPAIR TABLE 表名
本文探讨了MySQL中出现的错误134问题,详细解释了导致该错误的原因,包括进程在写入过程中被终止、意外关机等情况,并提供了通过CHECKTABLE及REPAIRTABLE命令修复受损表的具体方法。
3961

被折叠的 条评论
为什么被折叠?



