Forgot to backup my database before reinstalling WAMP

I uninstalled and reinstalled my WAMP earlier today. I backed up my /www directory but totally forgot about my database (phpmyadmin). I didn’t delete my C:/wamp directory, i just reinstalled on top of it.

Does this mean my databases are gone forever? Is there a way to retrieve them? Next time i’ll know to export a dump of my databases before I meddle with the installation, I guess I had to learn this the hard way…

Read More

Thanks for your help.

Related posts

Leave a Reply

2 comments

  1. That depends if you deleted the data directory or not. By default, wamp’s data directory is c:/wamp/bin/mysql/mysql5.x.x/data check there and see if you have some folders with the names of your old databases. In those folders there would be a bunch of .frm, .MYD, and .MYI files assuming you are using myisam. If those files exist then you can recover. Just make sure the datadir in my.ini is pointing to the directory where your database are and restart mysql. It should fix itself automatically.

    If you use innodb tables then it’s a little more complicated but can be done. Those would be stored in files named ibdata1, ibdata2, etc.

    If you don’t have any of those files then I’m afraid you’re out of luck.

  2. I was able to retrieve mine on windows 7 by doing the following

    Open Computer by clicking the Start button , and then clicking Computer.

    Navigate to the folder that used to contain the file or folder c:/wamp/bin/mysql/mysql5.x.x/data

    Copied it just in case I needed to revert

    Right-click it, and then click Restore previous versions. …

    Double-click a previous version of the folder that contains the file or folder you want to restore.