All Products
Search
Document Center

ApsaraDB RDS:Change the VPC and vSwitch

Last Updated:Aug 01, 2023

This topic describes how to change the virtual private cloud (VPC) and vSwitch of an ApsaraDB RDS for MySQL instance.

Note

For more information about how to change the VPC and vSwitch of an ApsaraDB RDS for PostgreSQL instance, see Switch an ApsaraDB RDS for PostgreSQL instance to a different vSwitch.

Prerequisites

The RDS instances uses the subscription or pay-as-you-go billing method.

Note

The VPC or vSwitch of a serverless RDS instance cannot be changed.

Limits

  • If your RDS instance uses local disks, you can directly change the VPC and vSwitch of the instance.

  • If your RDS instance uses cloud disks and you want to change the VPC of the instance, the minor engine version of your RDS instance must be 20201031 or later. For more information, see Update the minor engine version of an ApsaraDB RDS for MySQL instance.

Impacts

  • When you change the VPC and vSwitch of your RDS instance, a transient connection that lasts approximately 30 seconds occurs. Make sure that your application is configured to automatically reconnect to the RDS instance.

  • When you change the VPC and vSwitch of your RDS instance, the virtual IP addresses (VIPs) of your RDS instance also change. We recommend that you connect your application to your RDS instance by using an endpoint. For more information, see Configure endpoints for an ApsaraDB RDS for MySQL instance.

  • VIP changes affect the availability of DRDS for a short period of time. Refresh and view the connection information in the DRDS console.

  • VIP changes interrupt the connection between your RDS instance and Data Management (DMS) and the connection between your RDS instance and Data Transmission Service (DTS) for a short period of time. After the VPC and vSwitch of your RDS instance are changed, the connections are automatically resumed.

  • If data is cached on your database client, you can read data but cannot write data. We recommend that you clear the cache on the client at the earliest opportunity.

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
  2. In the left-side navigation pane, click Database Connection.

  3. Click Switch vSwitch.

  4. Select a VPC and a vSwitch. Then, click OK.

    Note

    If you want to create a VPC or a vSwitch, click go to the VPC console.

  5. In the message that appears, click OK.

    Note

    If you use RDS Cluster Edition, you can also click Edit in the Instance Topology Management section of the Basic Information page. In the dialog box that appears, click Change VPC/vSwitch to change the VPC and vSwitch.

FAQ

How do I change the VPC of an RDS instance if I cannot directly change the VPC and vSwitch of the instance?

You cannot directly change the VPC of an RDS instance whose minor engine version is earlier than 20201031. If you want to change the VPC of the RDS instance, use the following methods: