MySQL Forums
Forum List  »  Data Recovery

Re: Recovering from a computer failure
Posted by: Robert Pollard
Date: March 12, 2008 03:49PM

I must have posted this topic to the wrong forum. I thought someone out there would have run into this by now.

Anyway, I have figured out a way to actually recover the data. It is a pain but it works.

1.Using a ibdata1 file other than the one that contains you real data, manually create database and tables with a single field. I created an ID field with an auto_increment feature.
2.Stop the MySQL instance
3.Rename the useless ibdata1 file to something like ibdata1-old
4.Copy the data file that contains your real data to the current data directory of the active instance
5.Move the database folder containing the frm and other files over to the root MySQL data directory
6.Start MySQL again
7.In my case I had data in both ibdata1 files that I would have liked to keep. I exported and imported from one database to another to merge the 2 ibdata1 files.


1. Using SQLyog made creating the tables and a single field a breeze.
2. If you have multiple databases you can create all of them at once or do each one. If you do each one separately you can simply rename the ibdata1 files instead of moving them back and forth.

Hope this saves someone's butt like it did mine.

Options: ReplyQuote

Written By
Re: Recovering from a computer failure
March 12, 2008 03:49PM
September 07, 2008 09:42PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.