How to fix “ERROR 130 (HY000): Incorrect file format”

前端 未结 3 976
甜味超标
甜味超标 2020-12-11 02:04

I have a problem with my database when I made a query on one of my tables I get this error message

ERROR 130 (HY000): Incorrect file format

3条回答
  •  佛祖请我去吃肉
    2020-12-11 02:32

    Let me explain the details that I tried.

    I got this "Incorrect file format" after performing the mysqldump. It's similar to like we have the issue in the server startup/querying the tables.

    I went to the mysql/data/yourdatabasename folder and checked the table. (For MYISAM types of tables, we have .frm, .MYI, .MYD.) I found that the table has only tablename.frm only. So I just moved the frm part alone as it is not needed anymore because of the lack of .MYI and .MYD files. I did the same for some more tables that encountered with the incorrect file format problem.

    In my case, tables that I removed are not MYI/MYD and some of the tables are not having data. Please make sure of both the cases before you do any of this. If you do for the data available table, you will end up with the data loss for the tables you remove.

提交回复
热议问题