This topic describes how to switch an ApsaraDB RDS for MySQL instance to a different virtual private cloud (VPC) and a different vSwitch.

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

Limits

  • If your RDS instance uses local SSDs, you can switch the instance to a different VPC and a different vSwitch.
  • If your RDS instance uses standard SSDs or enhanced SSDs (ESSDs) and you want to switch the instance to a different VPC, the minor engine version of your RDS instance must be 20201031 or later. For more information about how to update the minor engine version of an RDS instance, see Update the minor engine version of an ApsaraDB RDS for MySQL instance.

Impacts

  • When your RDS instance is being switched to a different vSwitch, a transient connection that lasts approximately 30 seconds occurs. Make sure that your application is configured to automatically reconnect to your RDS instance.
  • The switching causes changes to the virtual IP addresses (VIPs) of your RDS instance. 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.
  • The changes to the VIPs temporarily interrupt the connections to DRDS . After the switching is complete, you must immediately update and view the endpoint configuration in the DRDS console.
  • The changes to the VIPs temporarily interrupt the connections to Data Management (DMS) and Data Transmission Service (DTS). After the switching is complete, these connections are automatically resumed.
  • If data is cached on your database client, you can read data but cannot write data. After the switching is complete, we recommend that you immediately clear the cache on the client.

Procedure

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS 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.

FAQ

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

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