All Products
Search
Document Center

ApsaraDB RDS:Connect to a database by using a database proxy endpoint

Last Updated:Mar 30, 2026

When you use read/write splitting or high-concurrency read workloads, connect your application through a database proxy endpoint instead of directly to the primary instance. The proxy distributes incoming requests across the primary instance and read-only instances based on the read/write attributes and read weight configured for each proxy endpoint.

This topic describes how to find your proxy endpoint and use it to connect to ApsaraDB RDS for MySQL.

Prerequisites

Before you begin, ensure that you have:

Find the proxy endpoint and port

Two pages in the ApsaraDB RDS console display the proxy endpoint and port. Use the Database Proxy page if you also need to modify endpoint settings or apply for a public endpoint.

Via the Database Proxy page

  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select the region where your instance resides, then click the instance ID.

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

  3. In the Connection Information section, note the proxy endpoint address and port.

Via the Database Connection page

  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select the region where your instance resides, then click the instance ID.

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

  3. In the Database Connection section, note the proxy endpoint address and port.

Note

Connect to your instance

After you obtain the proxy endpoint and port, connect to your ApsaraDB RDS for MySQL instance using any of the following methods.

Method Best for
Client or CLI Ad-hoc queries, database administration tools (e.g., MySQL Workbench, mysql CLI)
Application code Production applications using connection strings or SDKs
Important

The internal proxy endpoint cannot be used to connect from the Data Management (DMS) console. Use a client, CLI, or application instead.

What's next

API reference

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