When you connect to a PolarDB cluster, you must provide an endpoint of the PolarDB cluster. A PolarDB cluster provides a public endpoint and a private endpoint for each endpoint. This topic describes how to view and apply for an endpoint in the PolarDB console.
Primary endpoint and cluster endpoints
Endpoint | Description | Network type |
Cluster endpoint (recommended) |
Note A PolarDB cluster provides a default cluster endpoint. You can create one or more custom cluster endpoints based on your business requirements. When you create a custom cluster endpoint, you can specify the nodes that can be connected by using the endpoint and specify the read/write mode. For more information, see Configure PolarProxy. |
|
Primary endpoint |
|
Internal endpoints and public endpoints
Network type | Description | Scenario |
Internal network |
| Example:
|
Internet |
| Example: You can connect to a cluster by using a public endpoint to perform maintenance operations. |
View endpoints and ports
Log on to the PolarDB console.
In the left-side navigation pane, click Clusters.
In the upper-left corner, select the region in which the cluster is deployed.
Find the cluster and click its ID.
In the Database Connections section of the Basic Information page, you can use one of the following methods to view the endpoint and port information of the cluster:
Method 1
Click the icon in the upper-right corner of the Database Connections section to view the endpoint and port information.
Method 2
Click Configure to the right of the cluster endpoint. In the dialog box that appears, view the endpoint and port information in the Network Information section.
NoteIf you use a domain name to connect to a database, you can click Bind Private Domain Name to bind the domain name to a private endpoint. This way, you can retain the original database domain name after the database is migrated to the cloud. You can bind private domain names only to Private endpoints. For more information, see Private domain names.
Apply for an endpoint
Log on to the PolarDB console.
In the left-side navigation pane, click Clusters.
In the upper-left corner, select the region in which the cluster is deployed.
Find the cluster and click its ID.
In the Database Connections section of the Basic Information page, you can use one of the following methods to apply for an endpoint.
Method 1
Click the icon in the upper-right corner of the Database Connections section to switch views.
Click Apply.
Method 2:
Click Modify to the right of the cluster endpoint.
In the Network Information section of the dialog box that appears, click Apply.
NoteYou can apply only for Public endpoints.
When you create a cluster, a default Private endpoint is generated. You do not need to apply for this endpoint.
In the dialog box that appears, specify a prefix for the endpoint and click OK.
NoteThe prefix of the endpoint must meet the following requirements:
The prefix must be 6 to 40 characters in length, and can contain lowercase letters, digits, and hyphens (-).
The prefix must start with a letter and end with a digit or a letter.
What to do next
Related API operations
Operation | Description |
Queries the endpoints of a PolarDB cluster. | |
Creates a public endpoint for a PolarDB cluster. | |
Modifies the default endpoint of a PolarDB cluster. | |
Deletes a cluster endpoint of a PolarDB cluster. |