So I was updating to the latest version of AMPPS and I accidentally deleted all of my databases that were on the previous version of AMPPS. However I do have a backup of the old version of AMMPS saved on a hard drive. How would I go about restoring all the old databases into the new version?
-
If you have the files, I would think that you could use the `Import` tab in phpMyAdmin? – Paul T. Nov 03 '17 at 04:55
1 Answers
You might be able to completely replace the MySQL data directory in order to restore your files. You should not try to replace only certain files/folders, so this will completely wipe out anything in your current/new database.
You'll have to find the data directory, so from the command line client or phpMyAdmin's SQL tab enter the query SHOW VARIABLES LIKE '%datadir%';
(you could also use the phpMyAdmin 'Variables' tab to find this). I don't use AMPPS, but on my Linux system this gives me /var/lib/mysql/
.
Next, completely stop the MySQL service. I have no idea how to do that in AMPPS; I presume that there's a control panel/center like most of the other *MPS packages where you can start and stop individual services.
Now, remove the new datadir folder and replace it with the one from your backup. Keep a copy, of course, in case anything goes wrong.
Finally, start the MySQL service again. If everything went well, you'll be back to normal.

- 11,830
- 2
- 32
- 43