Recovering MySQL tables after WAMP reinstall
Posted by: anmic (---.adsl.dial-up.cz)
Date: April 11, 2008 06:08PM

After reinstalling WAMP5 1.7.4 which contains MySQL 5.0.45, I lost all my mysql data (forgot to do mysqldump before reinstalling).

However, I have copies of files that contain all the data I lost (*.myd, *.myi, *.frm ...). Is it possible to recover the data using those files? I tried to copy them back to the proper directory after reinstallation (wamp\bin\mysql\mysql5.0.45), but it didn't help.

Thank you for any advice,

M.

Options: ReplyQuote
Re: Recovering MySQL tables after WAMP reinstall
Posted by: DazB (---.cable.ubr12.brad.blueyonder.co.uk)
Date: April 16, 2008 01:07AM

Hi,

I copied the "ibdata1" file from the backup to restore the data.

Edit:

Copy the ib_logfile* files also

Daz



Edited 1 time(s). Last edit at 04/16/2008 02:15AM by DazB.

Options: ReplyQuote
Re: Recovering MySQL tables after WAMP reinstall - solved
Posted by: anmic (---.adsl.dial-up.cz)
Date: April 16, 2008 02:11PM

Thanks for your reply. I have just solved the problem and the database is now correctly restored. I had copied the original db files to a wrong location (to "wamp\bin\mysql\mysql5.0.45\data" instead of "wamp\mysql\data" which is correct path).

H.

Options: ReplyQuote
Re: Recovering MySQL tables after WAMP reinstall - solved
Posted by: nirad01 (---.dsl.lsan03.sbcglobal.net)
Date: April 19, 2008 03:43AM

Hi, I was wondering if you could elaborate on your solution.

I think I made the same mistake as you- I didn't backup my databases with an SQL dump, but I do have the original database files and folders. I thought I could just move the database folders to the WampServer 2.0 data folder (""wamp\bin\mysql\mysql5.0.51a\data"winking smiley and it would work- but while the database names would show up in the console and I could view the table names, I couldn't operate on them. For elaboration on this, you can see my original post here: [forum.wampserver.com]

Also, I didn't know if the ibdata and iblogfiles needed to be transferred too- since the new data folder had it's own ibdata and iblogfiles.

I tried moving the original database folder to "wamp\mysql\data" as worked for you, but MYSQL isn't installed in that folder so it doesn't find the databases there.

Thanks for your time.

Options: ReplyQuote
Re: Recovering MySQL tables after WAMP reinstall - solved
Posted by: anmic (---.adsl.dial-up.cz)
Date: April 19, 2008 08:32AM

After reinstalling, try to create a new test database and look for the new folder to locate the folder where MySQL actually stores its db files and folders. As for "ibdata" and "iblogfiles", I copied them back too. One last hint, don't try to restore the lost data while mysql daemon (service) is running. Stop the mysql service, close WAMP entirely and then check it in the Process Manager (Ctrl-Alt-Del) if there is no mysql process active. Then try to restore the files by copying them back to the folder you located in the first step. Hope this helps, H.

Options: ReplyQuote


Sorry, only registered users may post in this forum.