How to move MySql databases to a new system
I have recently updated up Development System and had to move a lot of MySql databases.
Since phpMyAdmin was not an option to move a ton of databases I have made some research and was happy to find out that mysql command line tool has options to do a full dump.
The following command will dump all mysal databases to file all_dbs.sql
mysqldump -u username -p – -all-databases > all_dbs.sql
Once I have made a full dump I tried to do phpMyAdmin import but since the dump was had multiple databases the size of the file was large.
I didn’t want to mess with configs to allow big file uploads. I want back to mysql command line for importing the databases.
The following command will import all_dbs.sql dump into mysql.
mysql -u root -p <all_dbs.sql
This works great if you are upgrading XAMPP or just want to backup all databases.
Hope that helps some of you.