---
title: How to Migrate Azure Database for MySQL to Vultr Managed Databases for MySQL
url: https://docs.vultr.com/how-to-migrate-azure-database-for-mysql-to-vultr-managed-databases-for-mysql
description: Migrate Azure Database for MySQL to Vultr Managed Databases with minimal downtime using backup, replication, and secure cutover steps.
publish_date: 2026-02-26T15:53:38.793000Z
last_updated: 2026-09-09T22:05:54.046695Z
author: Abhinav Shaurya Agarwal
header_image: https://docs.vultr.com/public/doc-assets/2488/77ba52ce-adaf-4a56-b421-bc5b862d4ee1.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

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:

* Have access to an existing Azure Database for MySQL - Flexible Server.
* Provision a [Vultr Managed Databases for MySQL cluster](https://docs.vultr.com/products/managed-database/mysql/provisioning) with the same MySQL version and a similar or higher size as your source Azure database.
* Install MySQL Workbench or the [`mysql` client tool on your workstation](https://docs.vultr.com/how-to-install-mysql-on-ubuntu-24-04).

## 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](https://portal.azure.com/).
1. Navigate to **Azure Database for MySQL flexible servers** and select your target server.
1. In the left menu, click **Networking** under **Settings**.
1. Under **Firewall rules**, click **Add current client IP address** to allow your workstation.
1. 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`

1. Click **Save** to apply the firewall rules.

    > [!NOTE]
    > Remove the `AllowAll` rule after completing the migration for security purposes.

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

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

1. Exit the MySQL console.

    ```sql
    mysql> EXIT;
    ```

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

1. Verify the backup file exists.

    ```console
    $ ls -lh azure_all_databases.sql
    ```

1. 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 Console, MySQL Workbench, or backup restoration with mysqldump. Choose the method that best fits your requirements.

1. Log in to the [Vultr Console](https://console.vultr.com).
1. Click **Products** and select **Databases**.
1. Click your target Vultr Managed Databases for MySQL cluster to open its management page.
1. Verify the connection credentials in the **Connection Details** section.

    ![Verify Vultr database credentials](https://docs.vultr.com/public/doc-assets/2152/33702c34-9bca-4f92-9741-6eec7a3f02c2.png)

???+ note "Using the Vultr Console"

    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.

    1. Navigate to your Vultr Managed Databases for MySQL cluster's management page.
    1. Click the **Migration** tab.

        ![Vultr Migration Tab](https://docs.vultr.com/public/doc-assets/2152/f781c319-109e-49b9-bd12-12f72692c1d4.png)

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

    1. Enable **SSL Required** since Azure Database for MySQL requires SSL connections by default.
    1. Click **Test Connection** to validate the connection.
    1. Click **Begin Migration** when the connection test succeeds.
    1. Monitor the migration progress on the cluster's management page.
    1. Navigate to the **Users and Databases** tab to verify your migrated databases appear.
    1. After all data is synchronized, click **Detach connection** on the **Migration** tab to complete the migration.

??? note "Using MySQL Workbench"

    MySQL Workbench provides a graphical interface for database migration with schema mapping and validation features.

    1. Download and install [MySQL Workbench](https://www.mysql.com/products/workbench/) if not already installed.
    1. Open MySQL Workbench.
    1. Click **Migration** on the left navigation menu.
    1. Click **Start Migration** at the bottom of the **Overview** section.
    1. Configure the source connection:

        * **Database System**: MySQL
        * **Connection Method**: Standard (TCP/IP)
        * **Hostname**: `YOUR-SERVER.mysql.database.azure.com`
        * **Port**: `3306`
        * **Username**: Your Azure admin username

    1. Click **Store in Vault**, enter your Azure database password, and click **OK**.
    1. Click **Test Connection** to verify connectivity.
    1. Click **Next** to proceed to target selection.
    1. Configure the destination connection with your Vultr Managed Databases for MySQL credentials:

        * **Connection Method**: Standard (TCP/IP)
        * **Hostname**: Your Vultr database hostname
        * **Port**: Your Vultr database port
        * **Username**: `vultradmin`

    1. Click **Store in Vault**, enter your Vultr database password, and click **OK**.
    1. Click **Test Connection** and then **Next** when successful.
    1. Select the databases to migrate from the **Schemas Selection** list.
    1. Click **Next** to review the object mapping.
    1. Keep **Migrate Table Objects** selected in the **Object Migration** section.
    1. Click **Next** through the **Manual Editing** and **Target Creation Options** pages.
    1. Check **Create schema in target RDBMS** and **Keep schemas if they already exist**.
    1. Click **Next** to begin the migration.
    1. Keep **Online copy of table data to target RDBMS** selected and click **Next**.
    1. Review the migration report and click **Finish**.

??? note "Using mysqldump Backup and Restore"

    This method uses the backup file created earlier to restore databases to Vultr.

    1. Decompress the backup file if compressed.

        ```console
        $ gunzip azure_all_databases.sql.gz
        ```

    1. Log in to your Vultr Managed Databases for MySQL cluster. Replace the placeholders with your Vultr credentials.

        ```console
        $ mysql -h VULTR-DATABASE-HOST -P VULTR-DATABASE-PORT -u vultradmin -p
        ```

    1. Create the target database if restoring a specific database.

        ```sql
        mysql> CREATE DATABASE webapp_production;
        ```

    1. Exit the MySQL console.

        ```sql
        mysql> EXIT;
        ```

    1. Import the backup file to Vultr.

        ```console
        $ mysql -h VULTR-DATABASE-HOST -P VULTR-DATABASE-PORT \
            -u vultradmin -p < azure_all_databases.sql
        ```

        For a specific database:

        ```console
        $ mysql -h VULTR-DATABASE-HOST -P VULTR-DATABASE-PORT \
            -u vultradmin -p webapp_production < webapp_production.sql
        ```

## 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
    ```

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

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

1. Switch to a migrated database.

    ```sql
    mysql> USE webapp_production;
    ```

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

1. Compare row counts with your source database.

    ```sql
    mysql> SELECT COUNT(*) FROM users;
    ```

    Output:

    ```
    +----------+
    | COUNT(*) |
    +----------+
    |    15000 |
    +----------+
    1 row in set (0.03 sec)
    ```

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

1. Back up the configuration file.

    ```console
    $ sudo cp wp-config.php wp-config.php.backup
    ```

1. Open the configuration file.

    ```console
    $ sudo nano wp-config.php
    ```

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

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

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

1. 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 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](https://docs.vultr.com/products/managed-database/mysql).
