2

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.

Yannick
  • 235
  • 3
  • 12
  • possible duplicate of [MySQL InnoDB tables corrupt -- how to fix?](http://stackoverflow.com/questions/1348350/mysql-innodb-tables-corrupt-how-to-fix) – Joren Oct 27 '13 at 11:35
  • Closely followed by the question to yourself. "Why didn't I do a back up?" Test of a true professional is never making this mistake again. – Tony Hopkinson Oct 27 '13 at 11:42
  • You're right, it's absolutely stupid that I didn't have some kind of SQL backup from the day before the crash, but only one from a week earlier. – Yannick Oct 27 '13 at 11:44

1 Answers1

1

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:

Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331
  • Thanks for your fast reply. I tried to run the repair query, but this resulted into the following error: 'Table 'users' doesn't exist'. It looks like MySQL doesn't even know that the table is there, but yet it shows up in the list of all the tables that are present in the database.. – Yannick Oct 27 '13 at 11:38
  • It must be a good way to solve this, but I'm pretty new to all of this and all those commands and terms (VDS, SSH) are blurry to me - It doesn't matter to me if I need to do some research on all of those things, but another solution would suit me better! – Yannick Oct 27 '13 at 11:50
  • I've managed to find some realy old MYD and MYI files, yet MySQL says that the table doesn't exist.. – Yannick Oct 27 '13 at 12:15