37

My hard-drive has encountered some problems and I am unable to boot Windows with it.

I am able to view the drive's contents by connecting it to another PC as an external drive.

On the culprit drive I was running a local WAMP server for dev purposes and I'm looking to save the mySQL databases from it.

I can see my wamp directory at E:\wamp. Is it possible to start up the server from here so as to use phpmyadmin to perform a mysqldump? If not what are my options to recover the DB-

irishbuzz
  • 2,420
  • 1
  • 19
  • 16

2 Answers2

62

On my system, they are in C:\Program Files (x86)\WampServer\bin\mysql\mysql5.1.53\data. So in yours they would be in E:\wamp\bin\mysql\mysql-version\data.

You can start mysql locally from E:\wamp\bin\mysql\mysql-version\bin, where all the executables are. Be aware that the configuration file you want to use is E:\wamp\bin\mysql\mysql-version\my.ini.

You can also simply copy all the subdirectories to another server. I'm no MySql expert, but that should let the other server use your databases without problem.

thirtydot
  • 224,678
  • 48
  • 389
  • 349
Jon
  • 428,835
  • 81
  • 738
  • 806
  • Unfortunately it looks like that folder is corrupted for me. I'm getting 'I/O error encountered' messages when trying to view it. It's possible that the folder was a victim of the Hard-drive corruption or maybe even the cause in some way. Nevertheless it looks like your solution is the correct recovery process so I will accept your answer and hopefully it will help others in future. Thanks Jon. – irishbuzz Apr 01 '11 at 15:56
  • I replaced full wamp\bin\mysql\mysql5.5.24 But it's showing databases, not tables – KarSho May 07 '14 at 11:25
  • After you've changed the location in my.ini, you can start mysqld.exe, (not mysql.exe ). Then you can export your database with phpMyAdmin or HeidiSQL (a desktop application). – luff Oct 25 '16 at 15:58
  • Working perfectly. Thank you – Saravana May 14 '20 at 15:31
2

I needed to re-install Wamp and I recovered my databases by copying the data directory in wamp\bin\mysql\mysql-version\ from a backup, phpMyAdmin picked up the databases and tables.