
Azure Database for MySQL is a fully managed relational database service built on the MySQL Community Edition. Migrating from Azure Database for MySQL to Vultr Managed Databases for MySQL offers predictable pricing, automated backups, and seamless integration with Vultr's global infrastructure. Vultr Managed Databases for MySQL provides a cost-effective solution with a developer-friendly interface, allowing you to focus on building applications rather than managing database infrastructure.
This guide explains how to migrate your Azure Database for MySQL to Vultr Managed Databases for MySQL with minimal downtime. You will configure network access, back up your source database, transfer your data, and verify the migration before cutting over applications.
Before you begin, you need to:
mysql client tool on your workstation.Azure Database for MySQL uses firewall rules to restrict access by default. Configure firewall rules to allow connections from your management workstation and the Vultr migration service.
Log in to the Azure Portal.
Navigate to Azure Database for MySQL flexible servers and select your target server.
In the left menu, click Networking under Settings.
Under Firewall rules, click Add current client IP address to allow your workstation.
To allow unrestricted access during migration, add a rule with:
AllowAll0.0.0.0255.255.255.255Click Save to apply the firewall rules.
Remove the AllowAll rule after completing the migration for security purposes.
Verify the connection details on the Overview page. Note the Server name (hostname) which typically follows the format YOUR-SERVER.mysql.database.azure.com.
Create a backup of your Azure database before migration to ensure you have a recovery option in case of errors.
Connect to your Azure Database for MySQL using the mysql client. Replace YOUR-SERVER with your server name and YOUR-USERNAME with your admin username.
Enter your password when prompted.
List all databases to identify which ones to migrate.
Your output should be similar to the one below:
Exit the MySQL console.
Back up all databases to a single file. Replace YOUR-SERVER and YOUR-USERNAME with your Azure credentials.
To back up a specific database:
The --set-gtid-purged=OFF option prevents MySQL from including Global Transaction Identifiers in the backup, avoiding conflicts when importing to Vultr.
Verify the backup file exists.
Compress the backup for faster transfer.
You can migrate your databases using live replication through the Vultr Console, MySQL Workbench, or backup restoration with mysqldump. Choose the method that best fits your requirements.
Log in to the Vultr Console.
Click Products and select Databases.
Click your target Vultr Managed Databases for MySQL cluster to open its management page.
Verify the connection credentials in the Connection Details section.
The Vultr Console provides a migration feature that performs live replication from your source database. This method minimizes downtime by continuously syncing data until you complete the cutover.
Navigate to your Vultr Managed Databases for MySQL cluster's management page.
Click the Migration tab.
Enter your Azure Database for MySQL connection details:
YOUR-SERVER.mysql.database.azure.com3306Enable SSL Required since Azure Database for MySQL requires SSL connections by default.
Click Test Connection to validate the connection.
Click Begin Migration when the connection test succeeds.
Monitor the migration progress on the cluster's management page.
Navigate to the Users and Databases tab to verify your migrated databases appear.
After all data is synchronized, click Detach connection on the Migration tab to complete the migration.
Verify that all data migrated correctly before cutting over applications.
Log in to your Vultr Managed Databases for MySQL cluster.
Check the MySQL version matches your source Azure database.
Output:
List all databases and verify your Azure databases are present.
Output:
Switch to a migrated database.
List tables and verify the schema structure.
Output:
Compare row counts with your source database.
Output:
Exit the MySQL console.
After verifying the migration, update your applications to connect to the Vultr database.
The following steps are intended for WordPress and Docker Compose applications. If your application is different, refer to your application documentation to update the database connection settings.
Navigate to your WordPress installation directory.
Back up the configuration file.
Open the configuration file.
Update the database connection settings with your Vultr credentials.
Save and close the file.
Restart your web server.
Apache on Debian/Ubuntu:
Apache on RHEL/CentOS:
Nginx:
Open your Docker Compose file.
Update the database environment variables.
Save and close the file.
Restart the containers.
You have migrated your Azure Database for MySQL to Vultr Managed Databases for MySQL. This guide covered configuring network access, backing up your source database, transferring data using the Vultr Console, MySQL Workbench, or mysqldump, and verifying the migration. Your applications now benefit from Vultr's predictable pricing and global infrastructure. For more information on managing your Vultr Managed Databases for MySQL cluster, visit the product documentation.
0 Comments
Be the first to comment and share your perspective with the community.