Recover database from hard drive

from the Artful MySQL Tips List

1 Install the same version of MySQL on the new machine

2 Temporarily install the old HD in the new PC as a secondary drive

3 Save a copy of my.ini

4 Touch up my.ini to point at the MySQL & InnoDB folders on that drive

5 Fire up MySQL, prove that the data is intact

6 Upgrade MySQL to the desired version

7 Do a complete logical backup with mysqldump

8 Bring down the server

9 Restore the copy of my.ini saved in step 3

10 Fire up the server, prove that the new datadir settings work correctly

11 Run the dump script made in step 7

Last updated 16 Aug 2019

Return to the Artful MySQL Tips page