Jump to content
Sign in to follow this  
phdphd

Recover DB after HDD crash

Recommended Posts

Hi All

I need a piece of advise. My computer crashed, and after the last DB backup I had made some updates to my database, which got lost.

I placed the HDD in an external HDD box and managed to recover all my data. So now I have my wamp folder and subfolders (bin, phpapps, www, …) in a temp folder in my new computer.

Once I have reinstalled the wamp app bundle, is it safe to just copy the folder of my database (bin\database\mysql-5.7.11\data\<my_database>) to the same path? If not, is it possible to first run mysqldump against the DB in the temp folder?

Thanks !

Share this post


Link to post
Share on other sites

You can't run mysqldump unless you have a running database.

 

Copy all the data files and use mysqlcheck to look for errors.

Share this post


Link to post
Share on other sites

I copied all the data files. In phpmyadmin, the database is listed, along with the table names, but if I click a table name, I get a "table does not exist" error. This is confirmed with mysqlcheck (for all tables).

Share this post


Link to post
Share on other sites

Did you copy all the files? Each table has 2-3 files, and InnoDB has other stuff. Did you do mysqlcheck with

--all-databases --extended --verbose
Copy literally everything from the old data/ directory to the new one.

Share this post


Link to post
Share on other sites

You are quicker than the light... I indeed initially just copied the data of the DB folder. Now all tables are listed. mysqlcheck is running ...

Share this post


Link to post
Share on other sites

Results of mysqlcheck : all tables in all databases are ok, except for the tables of database performance_schema, for which it says "The storage engine for the table doesn't support check". Is this an issue or a normal result for that table ?

Anyway, thank you very much for your help!

Share this post


Link to post
Share on other sites

performance_schema is special. Don't worry about it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.