That’s all! In this article, you learned how to easily migrate all MySQL/MariaDB databases from one server to another. Once the transfer completes, you can set the ownership of the mysql/mariadb data directory to user and group mysql, then do a directory listing to check that all files have been transferred. # rsync -avz /var/lib/mysql/* :/var/lib/mysql/ If you want to move all your MySQL databases, users, permissions and data structure old server to new, you can use rsync command to copy the all the content from the mysql/mariadb data directory to new server as shown. Transfer MySQL Databases and Users to New Server Once the import is completed, you can verify the databases on both servers using the following command on the mysql shell. # mysql -u -p newdatabase < database_name.sql # mysql -u -p -all-databases < all_databases.sql Once the MySQL dump file has been traferred to the new server, you can use the following command to import all your databases into MySQL. Open EasyWorship 6 Click the Profiles menu. Close all other programs and windows before starting. Import MySQL Databases Dump File to New Server Transfer EasyWorship 6 database to another computer running EasyWorship 6 Click Here for Video Instructions Backup Your Database (old computer) Connect your backup drive to the computer. Once you connect, the database will be transferred to the new server.
Now use scp command to transfer your databases dump file to the new server under home directory as shown. Transfer MySQL Databases Dump File to New Server If you want to dump a single database, you can use: # mysqldump -u root -p -opt > database_name.sql Once the dump is completed, you are ready to transfer the databases. # mysqldump -u -p -all-databases > all_databases.sql Then dump all your MySQL databases to a single file using the mysqldump command. Never mess with internal structure of the database, if you do, you will face problems in future.įirst start by login into your old server and stop the mysql/mariadb service using the systemctl command as shown.