All Products
Search
Document Center

ApsaraDB RDS:Change the VPC and vSwitch

Last Updated:Mar 28, 2026

Move an ApsaraDB RDS for MySQL instance to a different virtual private cloud (VPC) or vSwitch to adapt to network topology changes—without recreating the instance or migrating data manually.

Important

Serverless ApsaraDB RDS instances do not support VPC or vSwitch changes. This procedure applies only to instances using the subscription or pay-as-you-go billing method.

Prerequisites

Before you begin, ensure that you have:

  • An ApsaraDB RDS for MySQL instance using the subscription or pay-as-you-go billing method

  • A target VPC in the same region or under the same Alibaba Cloud account as the current VPC

  • A vSwitch in the target VPC and zone. If none exists, create a vSwitch in the VPC console first

Limitations

  • Cloud disk instances: The minor engine version must be 20201031 or later to change the VPC. To check and update the version, see Update the minor engine version.

  • Instances with Premium Local SSDs: No version requirement. Change the VPC and vSwitch directly.

Potential impacts

Changing the VPC and vSwitch triggers an instance switchover and changes the virtual IP addresses (VIPs) of the instance. Before you proceed:

  • Application reconnection: Configure your application to automatically reconnect to the instance, as it will briefly lose connectivity during the switchover.

  • Use an endpoint, not an IP address: Because VIPs change, connect your application using an endpoint rather than a hardcoded IP address.

  • DRDS: The VIP change briefly affects DRDS availability. Refresh the connection information in the DRDS console after the change completes. DRDS DRDS

  • Data Management (DMS) and Data Transmission Service (DTS): Connections to DMS and DTS are briefly interrupted but resume automatically.

  • DNS caching: If Domain Name System (DNS) caching is enabled on your database client, reads will work but writes will fail after the change. Clear the DNS cache on the client as soon as the change completes.

Change the VPC and vSwitch

  1. Go to the Instances page. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.

  2. In the left-side navigation pane, click Database Connection.

  3. In the Database Connection section, click Switch vSwitch.

  4. In the dialog box, select the target VPC and vSwitch, then click OK.

    If no vSwitch appears in the current zone, go to the VPC console to create one, then return to this step.
  5. In the confirmation dialog box, click OK.

The instance switchover starts. After it completes, the instance is connected to the new VPC and vSwitch.

For RDS Cluster Edition instances, you can also change the VPC and vSwitch from the Basic Information page. In the Instance Topology Management section, click Edit, then click Change VPC/vSwitch in the dialog box.

FAQ

My RDS instance uses cloud disks and its minor engine version is earlier than 20201031. How do I change its VPC?

Two options are available:

What's next