Reputation: 105
I would like to know How to restore MYSQL database after installing a different version of Wampserver. The explanation is as below:
I deleted the wampserver folder accidentally and I lost my MYSQL database. However, I have succeeded to restore the data folder that contains the database and I have installed another version of Wampserver (Actually, the old version of MYSQL that I was using was 5.5.8 , and the MYSQL version that I am using right now is 5.6.17) and I have tried to restore the database by copying its folder and putting it and the old ibdata1 file under the data folder of the new installation. But, unfortenately, that doesn't work.
So, my questions are:
Upvotes: 1
Views: 1742
Reputation: 145
You have to copy the folders in the data folder representing the individual databases AND THE FILES sitting in the data folder. Only copying the folders didn't work for me, but when I also copied the files, overwriting the already existing files in the data folder of the target installation of WAMP, it worked.
Upvotes: 0
Reputation: 131
In the past when this has happened to me, the only option that worked was to reinstall an older version of WAMP (i.e. MySQL) to match what my databases were created in originally. If you install the same WAMP again, copying the folder should work now.
If you can gain access to your databases at this point, then you can do a proper backup of them using phpmyadmin or mysqldump etc.
After you get a proper backup, remove the older WAMP version and install the latest version again. Now you have to restore the databases using the backup files in order to put them into the newer MySQL version.
Upvotes: 1
Reputation: 380
If you backed up your database you can restore it using your backup file. If you are using a graphical interface for mysql like PHPMyAdmin there is a import button you can use to import your .sql, .csv, .zip, or what ever extension you used to backup your database.
Upvotes: 0