MySQL 5.0 Restore 4.1 Databases on Windows
I just installed MySQL 5.0.27 today. I used to use MySQL 4.1.x, but I decided that I’d move to 5.0.x since it is now the GA release. I had all my previous databases backed up in their binary format, and since I didn’t have MySQL 4.1 installed when I installed 5.0.x, it did not update my tables. The interesting note about that is that on Windows, the process to do this manually is not as easy as it should be. Here are the steps:
- Stop the MySQL service (
net stop mysql
). - Move the binary files into the new /data/ directory.
- Delete ib_logfile0 and ib_logfile1 if they exist.
- Start the MySQL service (
net start mysql
). mysqlcheck --check-upgrade --all-databases --auto-repair --user=root --password
mysql --database=mysql --user=root --password
mysql> source c:\mysql\scripts\mysql_fix_priviledge_tables.sql
And now you’re all done!
Thanks Doug. Great solution, easy and reliable. Love it!