Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to restore MySQL database from WAMP?

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.

like image 583
dole doug Avatar asked Jan 17 '10 20:01

dole doug


People also ask

How do I restore an existing MySQL database?

In Database Explorer, right-click the server connection on which you want to restore the database and select Backup and Restore > Restore Database. In the Database Restore Wizard, select the backup file and click Restore.

Does Wamp support MySQL?

WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database.


1 Answers

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.

like image 71
noonex Avatar answered Sep 24 '22 12:09

noonex