แชร์ผ่าน


Move an Azure Database for MySQL server to another region by using the Azure portal

APPLIES TO: Azure Database for MySQL - Single Server

Important

Azure Database for MySQL single server is on the retirement path. We strongly recommend that you upgrade to Azure Database for MySQL flexible server. For more information about migrating to Azure Database for MySQL flexible server, see What's happening to Azure Database for MySQL Single Server?

There are various scenarios for moving an existing Azure Database for MySQL server from one region to another. For example, you might want to move a production server to another region as part of your disaster recovery planning.

You can use an Azure Database for MySQL cross-region read replica to complete the move to another region. To do so, first create a read replica in the target region. Next, stop replication to the read replica server to make it a standalone server that accepts both read and write traffic.

Note

This article focuses on moving your server to a different region. If you want to move your server to a different resource group or subscription, refer to the move article.

Prerequisites

  • The read replica feature is only available for Azure Database for MySQL servers in the General Purpose or Memory Optimized pricing tiers. Ensure the source server is in one of these pricing tiers.

  • Make sure that your Azure Database for MySQL source server is in the Azure region that you want to move from.

Prepare to move

To create a cross-region read replica server in the target region using the Azure portal, use the following steps:

  1. Sign in to the Azure portal.
  2. Select the existing Azure Database for MySQL server that you want to use as the source server. This action opens the Overview page.
  3. Select Replication from the menu, under SETTINGS.
  4. Select Add Replica.
  5. Enter a name for the replica server.
  6. Select the location for the replica server. The default location is the same as the source server's. Verify that you've selected the target location where you want the replica to be deployed.
  7. Select OK to confirm creation of the replica. During replica creation, data is copied from the source server to the replica. Create time may last several minutes or more, in proportion to the size of the source server.

Note

When you create a replica, it doesn't inherit the VNet service endpoints of the source server. These rules must be set up independently for the replica.

Move

Important

The standalone server can't be made into a replica again. Before you stop replication on a read replica, ensure the replica has all the data that you require.

Stopping replication to the replica server, causes it to become a standalone server. To stop replication to the replica from the Azure portal, use the following steps:

  1. Once the replica has been created, locate and select your Azure Database for MySQL source server.
  2. Select Replication from the menu, under SETTINGS.
  3. Select the replica server.
  4. Select Stop replication.
  5. Confirm you want to stop replication by clicking OK.

Clean up source server

You may want to delete the source Azure Database for MySQL server. To do so, use the following steps:

  1. Once the replica has been created, locate and select your Azure Database for MySQL source server.
  2. In the Overview window, select Delete.
  3. Type in the name of the source server to confirm you want to delete.
  4. Select Delete.

Next steps

In this tutorial, you moved an Azure Database for MySQL server from one region to another by using the Azure portal and then cleaned up the unneeded source resources.