6

Last month I had to reinstall Windows and I've moved the WAMP folder to another partition. Now I've installed WAMP again but I need the old database. How can I take the old MySQL database from the saved WAMP folder on the safe partion?

In the wamp/bin/mysql/../data/ I have my old databases. If I copy the database folder only, in phpMyAdmin I can't see all the tables/views from the old database.

3 Answers 3

6

Looks like you use InnoDB tables, so you should also copy ib* files in data folder (but this will overwrite any InnoDB table created in new installation.)

Alternatively (even better) you may set 'datadir' parameter in configuration file and specify path to data folder in old installation.

Sign up to request clarification or add additional context in comments.

Comments

1

When you're doing changes to MySQL server at the back side (i.e. not using standard MySQL commands or interfaces), remember to stop the server before any changes and start after doing the changes.

Anyway this is not the recommended practice, use mysqldump instead to take regular backups and you can later restore a dump file using mysql ... < dump-file.sql.

1 Comment

+1 for stating the obvious, i.e. restart the server (was what I forgot to do) :)
1

Goto old wamp like wamp\bin\mysql\mysql5.5.24\data folder and copy all content and paste or replace with new setup folder "wamp\bin\mysql\mysql5.5.24\data".

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.