All Products
Search
Document Center

ApsaraDB RDS:View and manage instance endpoints and ports

Last Updated:Jun 20, 2026

This topic describes how to view and manage endpoints and ports for your ApsaraDB RDS for MySQL instances in the RDS console.

Basic Edition and High-availability Edition instances

ApsaraDB RDS for MySQL Basic Edition and High-availability Edition instances provide the following two types of endpoints. View or modify them based on your connection scenario as follows:

Address Type

Usage Instructions

How to view and modify

Instance endpoint

The instance endpoint includes an internal endpoint and a public endpoint:

  • Internal endpoint: Access RDS over an internal network (such as a virtual private cloud (VPC)) for low latency and high stability. The system generates this endpoint automatically. For example, ECS instances in the same VPC use the internal endpoint to access the RDS database.

  • Public endpoint: Access RDS over the public network. You must manually request a public endpoint.

See the following sections to view and modify internal and public endpoints and ports.

Database proxy endpoint

If you enable database proxy for your instance (Basic Edition does not support this feature; High-availability Edition supports it), use the database proxy endpoint to connect to the instance. This maximizes read/write splitting performance and reduces the load on the primary instance.

View internal and public endpoints and ports

  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 ID of the instance.

  2. On the Basic Information page, in the Basic Information section, click View Details.

    Note

    The public endpoint appears only after you request a public endpoint.

    image.png

Modify internal and public endpoints and ports

Note

If you previously enabled Secure Sockets Layer (SSL) encryption for internal or public connections, you must first disable SSL before modifying the endpoints. Disabling SSL restarts the instance. Perform this operation during off-peak hours.

  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 ID of the instance.

  2. In the navigation pane on the left, click Database Connection.

  3. Click Modify Endpoint. image

  4. In the dialog box that appears, set the endpoint prefix and port number for the internal or public endpoint, then click OK.

    Note

    The endpoint prefix must be globally unique. You cannot change it to an existing endpoint.

Cluster Edition instances

ApsaraDB RDS for MySQL Cluster Edition instances provide a cluster read/write endpoint, a cluster read-only endpoint, node direct connection endpoints, and a database proxy endpoint. View or modify them based on your connection scenario:

Address Type

Description

How to view and modify

Cluster read/write endpoint

Each instance has only one read/write endpoint, which connects to the primary node in the cluster and supports read and write operations. The cluster read/write endpoint includes an internal endpoint (generated automatically) and a public endpoint (must be requested manually).

  • Internal endpoint: Access RDS over an internal network (such as a VPC) for low latency and high stability. For example, ECS instances in the same VPC use the internal endpoint to access the RDS database.

  • Public endpoint: Access RDS over the public network.

Cluster read/write endpoint

Cluster read-only endpoint

You can create only one read-only endpoint per instance. It connects to secondary nodes in the cluster and supports load balancing. The cluster read-only endpoint includes an internal endpoint (generated automatically when you create the read-only endpoint) and a public endpoint (must be requested manually).

The cluster read-only endpoint always maintains the number of secondary nodes you specify to ensure availability:

  • If a secondary node connected to the read-only endpoint fails, the system automatically rebuilds it.

  • If a secondary node connected to the read-only endpoint is promoted to the primary node, a new secondary node is automatically added to the read-only endpoint.

Cluster read-only endpoint

Node direct connection endpoint

Connect directly to a specific node. The primary node supports read and write operations. Secondary nodes are read-only.

The node direct connection endpoint includes an internal endpoint (generated automatically when you create the direct connection endpoint) and a public endpoint (must be requested manually).

Node direct connection endpoint

Database proxy endpoint

Cluster Edition instances have General-purpose database proxy enabled by default. You can configure the proxy endpoint as read/write or read-only:

Cluster read/write endpoint

The cluster read/write endpoint includes an internal endpoint and a public endpoint. The internal endpoint is generated automatically after instance creation. Request a public endpoint as needed.

  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 ID of the instance.

  2. On the Basic Information page, in the Instance Topology Management > Database Connection section, view or modify the cluster read/write endpoint and request a public endpoint.

    • View the cluster read/write endpoint: Hover your mouse over the read/write connection box and view the endpoint in the pop-up window.

    • Modify the cluster read/write endpoint or request a public endpoint: Click Edit. In the dialog box that appears, you can Change Endpoint, Change VPC, and Apply for a public endpoint.

    image

Cluster read-only endpoint

Create, view, and delete a cluster read-only endpoint

Note
  • Creating or deleting a cluster read-only endpoint does not affect the cluster read/write endpoint.

  • When you delete a cluster read-only endpoint, both its internal and public endpoints are released, and all database connections using this endpoint are interrupted.

  • Each Cluster Edition instance can have only one cluster read-only endpoint. Multiple secondary nodes share this endpoint for load balancing.

  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 ID of the instance.

  2. On the Basic Information page, in the Instance Topology Management > Database Connection section, choose:

    • Add address

      Click Add Endpoint. In the dialog box that appears, enter or select the internal endpoint prefix, internal endpoint port, VPC, and vSwitch. Add the secondary nodes you want to include, then click OK.

    • Delete Address

      In the target read-only connection box, click Delete. In the dialog box that appears, click OK.

  3. View the cluster read-only endpoint: On the Basic Information page, in the Instance Topology Management > Database Connection section, hover your mouse over the read-only connection box and view the endpoint in the pop-up dialog box.

    image

Adjust node configuration for the cluster read-only endpoint

Note
  • Add secondary nodes or adjust node weights: Existing database connections are unaffected. New connections (using the cluster read-only endpoint) use the updated node configuration for load balancing.

  • Remove secondary nodes: You must keep at least one secondary node. Connections to the removed node experience a transient disconnection lasting 30 to 120 seconds. Other nodes are unaffected.

  • When adjusting secondary node weights, ensure at least one node has a weight greater than 0.

  • Node configuration changes for the cluster read-only endpoint apply to both internal and public connections.

  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 ID of the instance.

  2. On the Basic Information page, in the Instance Topology Management > Database Connection section, click Edit in the read-only connection box:

    image

    • Add nodes and adjust weights: Select the secondary nodes you want to add to the endpoint and click the 加入 icon. Adjust node weights, then click OK.

    • Remove nodes: Select the nodes you want to remove and click the 删除 icon, then click OK.

    image

Node direct connection endpoint

  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 ID of the instance.

  2. On the Basic Information page, in the Instance Topology Management > Database Nodes section, create, view, modify, or request a public endpoint for node direct connection endpoints.

    • Create a node endpoint: In the target node area, click Create Node Endpoint, configure internal network information, then click OK.

    • View, modify, or request a public endpoint for a node direct connection endpoint: Click Manage. In the dialog box that appears, you can Change Endpoint, Change VPC, and Apply for a public endpoint.

    image

FAQ

Q: Do I need to update the endpoint or port in my application after modifying it?

A: It must be modified; otherwise, the application cannot connect to the database.

Q: Does modifying an endpoint or port take effect immediately? Do I need to restart the instance?

A: Yes, it takes effect immediately. No restart is required.

Q: After modifying or releasing an endpoint, can I reuse the original endpoint on another instance?

A: Yes, you can.

Q: Does the instance endpoint change after a successful primary/secondary switchover?

A: No, it does not. The endpoint remains unchanged. After the switchover, the original primary instance becomes a secondary instance, and applications automatically connect to the new primary instance (the original secondary instance).

Q: How do I resolve the error "Invalid connection string format" with error code InvalidConnectionString.Malformed when modifying an endpoint?

A: This error occurs for one of the following reasons:

  • Reason 1: SSL is enabled for the instance, causing the endpoint modification to fail.

    Solution: Disable SSL encryption, then modify the endpoint.

  • Reason 2: The modified connection string does not meet requirements—for example, the endpoint prefix has fewer than 8 characters or the total length exceeds 63 characters.

    Solution: Optimize the modified endpoint to meet these requirements: The endpoint prefix must start with a lowercase letter, end with a lowercase letter or digit, and can contain lowercase letters, digits, and hyphens (-). It must be at least 8 characters long. The total endpoint length (prefix + suffix) must not exceed 63 characters.

Q: Why do CPU or memory usage differ among nodes in a Cluster Edition instance when all node weights are equal?

A: Server Load Balancer (SLB) performs load balancing based on connection count, but each connection consumes different amounts of CPU or memory resources.

Q: Does adjusting node weights in a Cluster Edition instance affect existing connections? Does it cause brief service unavailability?

A: No, it does not. Adjusting node weights affects only new connections. Existing connections remain unaffected, and no service unavailability occurs.

Q: Can I set the weights of all nodes to 0 in a Cluster Edition instance?

A: No, you cannot. At least one node must have a weight greater than 0.

Q: Can I remove all nodes from an endpoint in a Cluster Edition instance?

A: No, you cannot. A cluster read-only endpoint must retain at least one node.

Related APIs

API

Description

Create an endpoint for an instance

Creates an endpoint for an ApsaraDB RDS for MySQL Cluster Edition instance.

Delete an endpoint for an instance

Deletes an endpoint for an ApsaraDB RDS for MySQL Cluster Edition instance.

Modify endpoint connection information for an instance

Modifies endpoint information for an ApsaraDB RDS for MySQL Cluster Edition instance.