ERROR 1017 (HY000): Can't find file: 'tablename' (errno: 2)

简介:

系统因为突然断电,导致查询mysql数据时老是失败。报ERROR 1017 (HY000): Can't find file: 'tablename' (errno: 2)这个错误。

  使用正常的修复表的操作对其进行修复,则查询报相同的错误,修复表失败。

  仔细查看一下,这个表的数据文件,发现了问题。由于这个表做了分区,发现有个别的分区和其它的不一样:

  tablename#P#temp#p20170919.MYD

  tablename#P#temp#p20170919.MYI

  分区文件中多了一个“#temp”,将其重命名为正常的名字后,查询该表正常了。推测是程序在对分区操作的过程中正好断电了,导致分区异常。



 本文转自 XDATAPLUS 51CTO博客,原文链接:http://blog.51cto.com/xdataplus/1966541

相关文章
MySQL 报错 [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file
MySQL 报错 [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file
1158 0
|
10月前
|
syntax error: unexpected end of file
syntax error: unexpected end of file
46 0
Error:fatal error C1010: unexpected end of file while looking for precompiled head
Error:fatal error C1010: unexpected end of file while looking for precompiled head
139 0
Parse error: syntax error, unexpected '<<' (T_SL) in .../test2.php on line 2
Parse error: syntax error, unexpected '<<' (T_SL) in .../test2.php on line 2
204 0
pymysql.err.OperationalError: (1292, "Incorrect date value: '2021-05-2000:00:00' for column 'yeardaytime' at row 1") 怎么办?
这个错误是由于在向MySQL数据库的'yeardaytime'列插入数据时,数据包含了无效的日期值。具体来说,'2021-05-2000:00:00' 不是一个有效的日期时间格式 为了解决这个问题,您可以尝试以下方法之一:
1772 0
collect1:error:ld returned 1 exit status 解决办法
collect1:error:ld returned 1 exit status 解决办法
collect1:error:ld returned 1 exit status 解决办法