This topic describes how to change the network type of an ApsaraDB RDS for MySQL instance between classic network and VPC.
For more information about how to change the network type in other database engines, see the following topics:
Network types
- Classic network: RDS instances in the classic network are not isolated. You can block unauthorized access only by configuring IP address whitelists or security groups on these instances.
- VPC: Each virtual private cloud (VPC) is an isolated network. We recommend that you
select the VPC network type because it is more secure than the classic network.
You can configure route tables, Classless Inter-Domain Routing (CIDR) blocks, and gateways in a VPC. To smoothly migrate applications to the cloud, you can connect your own data center to a VPC by using use leased lines or VPNs. This allows you to build a virtual data center on the cloud.
- You can select the classic or VPC network type and change between the two network types free of charge.
- Before you change the network type, you must switch the RDS instance to the enhanced whitelist mode. For more information, see Switch to the enhanced whitelist mode for an ApsaraDB RDS for MySQL instance.
Change the network type from VPC to classic network
- After you change the network type from VPC to classic network, the internal endpoint of the RDS instance remains unchanged. However, the IP address bound to the internal endpoint changes.
- After you change the network type from VPC to classic network, you cannot access the RDS instance by using the internal endpoint. This applies to an Alibaba Cloud Elastic Compute Service (ECS) instance that no longer resides in the same VPC as the RDS instance. Make sure that you immediately update the endpoint information on your application after you change the network type.
- When you change the network type from VPC to classic network, a transient connection error of about 30 seconds may occur. To avoid interruptions to your workloads, we recommend that you perform the network type change during off-peak hours. Alternatively, make sure that your application is configured to automatically reconnect to the RDS instance.
- If the RDS instance runs MySQL 5.7 or 8.0 on RDS High-availability Edition with standard or enhanced SSDs or runs MySQL 8.0 on RDS Basic Edition, you cannot change the network type from VPC to classic network.
Procedure
Change the network type from classic network to VPC
Procedure
FAQ
- How do I change the VPC of my RDS instance?
- If your RDS instance supports VPC and VSwitch changes, you can directly perform these changes. For more information, see Switch to a new VPC and VSwitch for an RDS MySQL instance.
- If your RDS instance supports changes between the classic and VPC network types, follow
these steps:
- Change the network type from VPC to classic network.
- Change the network type from classic network to VPC with the required VPC selected.
- If your RDS instance does not support changes between the classic and VPC network
types, follow these steps:
Purchase a new RDS instance with the required VPC selected. Then, migrate the data of your RDS instance to the new RDS instance. For more information, see Migrate data between ApsaraDB for RDS instances.
- Can applications access my VPC-housed RDS instance over the Internet?
Yes, if the IP addresses of the applications are added to an IP address whitelist of your RDS instance, the applications can access your RDS instance over the Internet. This applies regardless of whether your RDS instance resides in a VPC or the classic network. For more information, see Configure a whitelist for an ApsaraDB RDS for MySQL instance.
Related operations
Operation | Description |
---|---|
Switch network type | Changes the network type of an ApsaraDB for RDS instance. |