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
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:
- Update the minor engine version of the RDS instance. Then, perform the operations that are described in this topic. 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.
- If you do not want to update the minor engine version of the RDS instance, purchase a new RDS instance that resides in the required VPC. Then, migrate the data of the original RDS instance to the new RDS instance. For more information, see Create an ApsaraDB RDS for MySQL instance and Migrate data between ApsaraDB RDS for MySQL instances.