0

My MySQL crashed yesterday, and in a panic I ended up (stupidly) deleting the ibdata1 and innodb logfiles.

I then used the testdisk feature and recovered the old ibdata1, but was unable to recover the logfiles.

I have tried about a hundred different methods in attempts to got it working and found that the innodb tables in my databases are corrupt and cannot be loaded by phpmyadmin (this is when using a new ibdata1 file).

When trying to load with

mysqld --user=mysql --verbose

I get this error: http://pastebin.com/GUTe7hRJ

Any assistance I would be incredibly thankful for, I am at my wits end and have a few hundred people relying on this being back up ASAP.

Matt
  • 109
  • 2
  • 1
    You'll likely need `innodb_force_recovery`, but for the love of all that's holy, **take a backup this time**. Step one of disaster recovery is *don't panic*. – ceejayoz Sep 08 '15 at 16:27
  • I wouldn't rely on testdisk or any other tool that "undeletes" a file. Don't know why but every time I tried them (or seen other people did) ibdata1 or *.ibd files were always corrupt. Your error log shows corruption, too. Instead, mount the volume read-only, use stream_parser to find InnoDB pages from the volume and fetch records from the pages. Check posts on https://github.com/twindb/undrop-for-innodb - they should help. BTW, you don't need redo logs – akuzminsky Sep 08 '15 at 16:43
  • akuzminsky what exactly should i do? bit confused on what you meant? – Matt Sep 08 '15 at 17:35

1 Answers1

1
user9517
  • 115,471
  • 20
  • 215
  • 297