If you have a server with multiple MySQL databases running on it, you can simplify the backups and restore process by backing up and restoring all databases with mysqldump.
Backing up All Databases
Run the following command to backup all databases at once:
mysqldump -u root -p --all-databases > all_databases.sql
Now copy this file somewhere safe in case you need to restore it.
Restore All Databases
To restore the backup of all of your databases run the following command:
mysql -u root -p < alldb.sql
Type your mysql root user password and then all databases will be restored.