This topic describes how to change the network type of the read/write splitting address for an RDS 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.

Prerequisites

Precautions

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.

Procedure

  1. Log on to the RDS console.
  2. Select the target region.选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Database Connection or Database Proxy.
  5. Click the Read/Write Splitting tab.
  6. Click Switch to Internet Address or Switch to Inner Address.
  7. In the displayed dialog box, click Confirm.切换为外网地址

Reference

FAQ for read/write splitting