Yannick
Yannick

Reputation: 235

Restore a corrupted table

A few days ago my whole server decided to crash itself. Luckily for me, I managed to recover the data folder from my MySQL installation.

The bad part is that not all my tables work as they did before. For example: my users table is useless because it doesn't have any structure anymore but only the rows within it (the .frm and .ibd files). I tried the following query to resolve this problem:

REPAIR TABLE users USE_FRM

Sadly, this showed me the error 'Can't open table' and now I still haven't managed to restore this table.

If anyone could help me out with this problem, I'd realy appreciate it!

I would be happy to share the ibd and frm files if needed.

Upvotes: 2

Views: 3539

Answers (1)

Rahul Tripathi
Rahul Tripathi

Reputation: 172408

You may have a try on this:

Use the USE_FRM option only if you cannot use regular REPAIR modes! Telling the server to ignore the .MYI file makes important table metadata stored in the .MYI unavailable to the repair process, which can have deleterious consequences:[.....]

Also you may try to create the .MYI file from scratch like this:

REPAIR TABLE tablename USE_FRM

You may also check these references:

Upvotes: 1

Related Questions