Fix SQL error Index for table 'user_db' is corrupted, try to repair it

I am receiving an SQL error: Index for table 'user_db' is corrupted, try to repair it. I am not sure what went wrong.

How can I fix this ?
15 Jan 2021 at 06:51 PM
0pnshow more
StorStor
Hi,

The error "Index for table '' is corrupted, try to repair it" is related to the specific table, which for some reason became corrupted, as mentioned in the notification. This problem can be solved using TABLE REPAIR. You can try to fix it with the first solution and if it will not work, you can try the second one with USE_FRM.

Please note that using of these solutions to repair the table, may cause the data loss under some circumstances. It is recommended to make a backup of a table before performing a table repair operation. I used TABLE REPAIR on localhost, where the data loss may not be so serious.

Regular table repair:

TABLE REPAIR table_name;
Table repair with using USE_FRM:

TABLE REPAIR table_name USE_FRM;
16 Jan 2021 at 02:05 PM
0pnshow more
TimTim
Share on FacebookShare on TwitterShare on LinkedInSend email
Follow us on Facebook & Twitter
2021 AnswerTabsTermsContact us