How to Migrate Azure Database for MySQL to Vultr Managed Databases for MySQL

Updated on 26 February, 2026
Guide
Migrate Azure Database for MySQL to Vultr Managed Databases with minimal downtime using backup, replication, and secure cutover steps.
How to Migrate Azure Database for MySQL to Vultr Managed Databases for MySQL header image

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.

Prerequisites

Before you begin, you need to:

Allow Network Connections to the Source Azure Database for MySQL

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.

  1. Log in to the Azure Portal.

  2. Navigate to Azure Database for MySQL flexible servers and select your target server.

  3. In the left menu, click Networking under Settings.

  4. Under Firewall rules, click Add current client IP address to allow your workstation.

  5. To allow unrestricted access during migration, add a rule with:

    • Rule name: AllowAll
    • Start IP address: 0.0.0.0
    • End IP address: 255.255.255.255
  6. Click Save to apply the firewall rules.

    Note
    Remove the AllowAll rule after completing the migration for security purposes.
  7. Verify the connection details on the Overview page. Note the Server name (hostname) which typically follows the format YOUR-SERVER.mysql.database.azure.com.

Back Up the Source Azure Database for MySQL

Create a backup of your Azure database before migration to ensure you have a recovery option in case of errors.

  1. 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.

    console
    $ mysql -h YOUR-SERVER.mysql.database.azure.com -u YOUR-USERNAME -p
    

    Enter your password when prompted.

  2. List all databases to identify which ones to migrate.

    sql
    mysql> SHOW DATABASES;
    

    Your output should be similar to the one below:

    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | mysql              |
    | performance_schema |
    | sys                |
    | webapp_production  |
    | analytics_db       |
    +--------------------+
    6 rows in set (0.12 sec)
  3. Exit the MySQL console.

    sql
    mysql> EXIT;
    
  4. Back up all databases to a single file. Replace YOUR-SERVER and YOUR-USERNAME with your Azure credentials.

    console
    $ mysqldump -h YOUR-SERVER.mysql.database.azure.com \
        -u YOUR-USERNAME -p --all-databases \
        --set-gtid-purged=OFF --single-transaction \
        --triggers --routines > azure_all_databases.sql
    

    To back up a specific database:

    console
    $ mysqldump -h YOUR-SERVER.mysql.database.azure.com \
        -u YOUR-USERNAME -p webapp_production \
        --set-gtid-purged=OFF --single-transaction \
        --triggers --routines > webapp_production.sql
    

    The --set-gtid-purged=OFF option prevents MySQL from including Global Transaction Identifiers in the backup, avoiding conflicts when importing to Vultr.

  5. Verify the backup file exists.

    console
    $ ls -lh azure_all_databases.sql
    
  6. Compress the backup for faster transfer.

    console
    $ gzip azure_all_databases.sql
    

Migrate Azure Database for MySQL to Vultr Managed Databases for MySQL

You can migrate your databases using live replication through the Vultr Customer Portal, MySQL Workbench, or backup restoration with mysqldump. Choose the method that best fits your requirements.

  1. Log in to the Vultr Customer Portal.

  2. Click Products and select Databases.

  3. Click your target Vultr Managed Databases for MySQL cluster to open its management page.

  4. Verify the connection credentials in the Connection Details section.

    Verify Vultr database credentials

Using the Vultr Customer Portal

The Vultr Customer Portal 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.

  1. Navigate to your Vultr Managed Databases for MySQL cluster's management page.

  2. Click the Migration tab.

    Vultr Migration Tab

  3. Enter your Azure Database for MySQL connection details:

    • Hostname: YOUR-SERVER.mysql.database.azure.com
    • Port: 3306
    • Username: Your Azure admin username
    • Password: Your Azure admin password
  4. Enable SSL Required since Azure Database for MySQL requires SSL connections by default.

  5. Click Test Connection to validate the connection.

  6. Click Begin Migration when the connection test succeeds.

  7. Monitor the migration progress on the cluster's management page.

  8. Navigate to the Users and Databases tab to verify your migrated databases appear.

  9. After all data is synchronized, click Detach connection on the Migration tab to complete the migration.

Test the Vultr Managed Databases for MySQL

Verify that all data migrated correctly before cutting over applications.

  1. Log in to your Vultr Managed Databases for MySQL cluster.

    console
    $ mysql -h VULTR-DATABASE-HOST -P VULTR-DATABASE-PORT -u vultradmin -p
    
  2. Check the MySQL version matches your source Azure database.

    sql
    mysql> SELECT @@version;
    

    Output:

    +-----------+
    | @@version |
    +-----------+
    | 8.0.35    |
    +-----------+
    1 row in set (0.10 sec)
  3. List all databases and verify your Azure databases are present.

    sql
    mysql> SHOW DATABASES;
    

    Output:

    +--------------------+
    | Database           |
    +--------------------+
    | defaultdb          |
    | information_schema |
    | mysql              |
    | performance_schema |
    | sys                |
    | webapp_production  |
    | analytics_db       |
    +--------------------+
    7 rows in set (0.08 sec)
  4. Switch to a migrated database.

    sql
    mysql> USE webapp_production;
    
  5. List tables and verify the schema structure.

    sql
    mysql> SHOW TABLES;
    

    Output:

    +---------------------------+
    | Tables_in_webapp_production |
    +---------------------------+
    | users                     |
    | orders                    |
    | products                  |
    +---------------------------+
    3 rows in set (0.05 sec)
  6. Compare row counts with your source database.

    sql
    mysql> SELECT COUNT(*) FROM users;
    

    Output:

    +----------+
    | COUNT(*) |
    +----------+
    |    15000 |
    +----------+
    1 row in set (0.03 sec)
  7. Exit the MySQL console.

    sql
    mysql> EXIT;
    

Cutover to Vultr Managed Databases for MySQL

After verifying the migration, update your applications to connect to the Vultr database.

Note
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.

Update WordPress Applications

  1. Navigate to your WordPress installation directory.

    console
    $ cd /path/to/wordpress/
    
  2. Back up the configuration file.

    console
    $ sudo cp wp-config.php wp-config.php.backup
    
  3. Open the configuration file.

    console
    $ sudo nano wp-config.php
    
  4. Update the database connection settings with your Vultr credentials.

    php
    /** The name of the database for WordPress */
    define('DB_NAME', 'webapp_production');
    
    /** MySQL database username */
    define('DB_USER', 'vultradmin');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'YOUR-VULTR-PASSWORD');
    
    /** MySQL hostname */
    define('DB_HOST', 'VULTR-DATABASE-HOST:VULTR-DATABASE-PORT');
    

    Save and close the file.

  5. Restart your web server.

    • Apache on Debian/Ubuntu:

      console
      $ sudo systemctl restart apache2
      
    • Apache on RHEL/CentOS:

      console
      $ sudo systemctl restart httpd
      
    • Nginx:

      console
      $ sudo systemctl restart nginx
      

Update Docker Applications

  1. Open your Docker Compose file.

    console
    $ nano docker-compose.yml
    
  2. Update the database environment variables.

    yaml
    services:
      app:
        environment:
          MYSQL_HOST: "VULTR-DATABASE-HOST"
          MYSQL_PORT: "VULTR-DATABASE-PORT"
          MYSQL_USER: "vultradmin"
          MYSQL_PASSWORD: "YOUR-VULTR-PASSWORD"
          MYSQL_DATABASE: "webapp_production"
    

    Save and close the file.

  3. Restart the containers.

    console
    $ docker compose down
    $ docker compose up -d
    

Conclusion

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 Customer Portal, 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.

Comments