All Products
Search
Document Center

ApsaraDB RDS:Use a database proxy endpoint to connect to a database

Last Updated:Aug 13, 2024

In business scenarios such as read/write splitting and processing of highly concurrent read operations, we recommend that you use a database proxy endpoint in your application to connect to your ApsaraDB RDS for MySQL instance. This way, the system can distribute requests based on the read and write attributes and the read weight that you configure for the database proxy endpoint to reduce the loads on the primary RDS instance. This topic describes how to view, manage, and use database proxy endpoints.

Prerequisites

The database proxy feature is enabled. For more information, see Enable the database proxy feature.

Procedure

View and manage the database proxy endpoint and port

You can view and manage the database proxy endpoint and the port that is associated with the database proxy endpoint for your RDS instance in the ApsaraDB RDS console by using one of the following methods:

Perform operations on the Database Proxy page

  1. Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the instance ID.

  2. In the left-side navigation pane, click Database Proxy.

  3. In the Connection Information section, view the database proxy endpoint and the port that is associated with the database proxy endpoint.

Perform operations on the Database Connection page

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the instance ID.

  2. In the left-side navigation pane, click Database Connection.

  3. In the Database Connection section, view the database proxy endpoint and the port that is associated with the database proxy endpoint.

Note

Connect to an RDS instance

After you obtain the database proxy endpoint and the port that is associated with the database proxy, you can use a client, the CLI, or an application to connect to your RDS instance. You cannot use the internal endpoint of the obtained database proxy endpoint to connect to your RDS instance in the Data Management (DMS) console. For more information about connection methods, see the following topics:

References

Related operations

Operation

Description

DescribeDBProxy

Queries the details about the database proxy of an instance.

DescribeDBProxyEndpoint

Queries the database proxy endpoint of an instance.

ModifyDBProxyEndpoint

Modifies the connection settings for a database proxy endpoint of an instance.