This topic describes how to change the network type of the read/write splitting address for an RDS for MySQL instance. When you enable the read/write splitting function, you can use the internal or public endpoint of the master instance as the read/write splitting address.
If your application is deployed in the same VPC as the RDS instance, we recommend that you use the internal endpoint to guarantee data security and communication efficiency. If your application is deployed on your computer or in a different network from your RDS instance, you can use the public endpoint to establish a connection.
- The read/write splitting function is enabled. For more information, see Enable read/write splitting for an RDS for MySQL instance.
- The MySQL version and RDS edition are as follows:
Note The read/write splitting function is available in MySQL 8.0 only when the dedicated database proxy service is enabled. However, MySQL 8.0 supports only the VPC network type, therefore you cannot switch to the public endpoint.
- MySQL 5.7 High-availability Edition (with local SSDs)
- MySQL 5.6
When you change the network type of the read/write splitting address, the master instance experiences a transient disconnection for up to 30 seconds. To avoid the impact of the transient disconnection, we recommend that you change the network type during off-peak hours and make sure that your application can automatically reconnect to the RDS instance.
- Log on to the RDS console.
- Select the target region.
- Find the target RDS instance and click the instance ID.
- In the left-side navigation pane, click Database Connection or Database Proxy.
- Click the Read/Write Splitting tab.
- Click Switch to Internet Address or Switch to Inner Address.
- In the displayed dialog box, click Confirm.