Hi all! I recently had a hdd crash on my dedicated server and the technical department replaced the old hdd with a new one. They made a new install of Debian on it and after that mounted my old hdd. My question is, how can I recover all mysql databases from the old hdd which is mounted ? Thank you
Nice answer .. however I need someone who can really tell me what can I do ? Stop posting stupid answers
if you have backups you can recover your databases otherwise there is no other option simply ask your hosting providers otherwise they can't be recovered... unless you have backups.. if it's a unmanaged server you can't do anything.. First everybody should ask their webhosting providers before doing anything...
Shutdown the newly installed mysql. Move the /var/lib/mysql folder to a backup location and copy the same folder from your old hard drive to this location. Make sure the ownership and permissions are correct (owner:group should be mysql:mysql for the whole folder). Then start the mysqld service and you should have the previous DB. If you already have a full backup somewhere, you can import it like this: mysql -u root -p < full_backup.sql Code (markup):