Connect to a PolarDB cluster through its cluster endpoint or primary endpoint. You can view, apply for, create, modify, and release endpoints from the console.
Prerequisites
Gather the required connection information from Connect to a database cluster.
View endpoints and ports
-
Log on to the PolarDB console.
-
In the upper-left corner, select the region where your cluster is deployed.
-
Find the target cluster and click its ID.
-
On the Basic Information page, in the Database Connections section, hover over the target endpoint. The Network Information dialog box appears, displaying the endpoint and port number.
The dialog box shows private and public endpoints. A primary endpoint connects to the primary node for read/write operations. A cluster endpoint [Recommended] supports read/write splitting. Click Create Custom Cluster Endpoint to add a custom endpoint.
-
To keep using a domain name after migrating to the cloud, click Bind Private Domain Name. Only Private endpoints support private domain binding. Private domain names.
-
The default port for PolarDB for MySQL endpoints is 3306, which you can customize. Modify an endpoint.
Apply for public endpoints
Log on to the PolarDB console.
In the upper-left corner, select the region where the cluster is deployed.
Find the target cluster and click its ID.
-
On the Basic Information page, in the Database Connections section, find the target endpoint and click Apply to the right of Public.
NoteYou can only apply for a Public endpoint. A Private endpoint is generated automatically when the cluster is created.
-
In the dialog box, enter an endpoint prefix and click OK.
NoteThe endpoint prefix must meet the following requirements:
-
Must be 6 to 40 characters long and contain only lowercase letters, digits, and hyphens (-).
-
Must start with a lowercase letter and end with a letter or a digit.
PolarProxy is enabled by default after the cluster endpoint is created. Adjust settings in Configure PolarProxy.
-
Create a custom endpoint
In the Database Connections section of the Basic Information page, click Create Custom Cluster Endpoint to create a custom endpoint and configure PolarProxy. Configure PolarProxy.
PolarDB for MySQL Cluster Edition lets you specify a VPC and a vSwitch when creating an endpoint. Change the VPC and vSwitch.
Modify an endpoint
In the Database Connections section on the Basic Information page, find the target endpoint. To the right of the Private or Public address, click the
icon and select Edit.
-
The endpoint prefix must meet the following requirements:
-
Must be 6 to 40 characters long and contain only lowercase letters, digits, and hyphens (-).
-
Must start with a lowercase letter and end with a letter or a digit.
-
-
The port number must be in the range of 3000 to 5999.
-
If SSL encryption is enabled, modifying the endpoint restarts the cluster.
-
With SSL enabled, the modified endpoint must not exceed 64 characters.
PolarDB for MySQL Cluster Edition lets you change the VPC and vSwitch for an endpoint. Change the VPC and vSwitch.
Release an endpoint
-
Before releasing an endpoint, ensure your applications use another endpoint.
-
A released endpoint cannot be recovered. You must Apply for a new one.
-
The default cluster endpoint can only be modified, not released. Custom cluster endpoints can be released.
In the Database Connections section on the Basic Information page, find the target endpoint. To the right of the Public address, click the
icon and select Release.
Only public endpoints can be released.
Next steps
API reference
|
API |
Description |
|
Queries the endpoints of a cluster. |
|
|
Creates a public endpoint for a cluster. |
|
|
Modifies an endpoint of a cluster. |
|
|
Deletes a public endpoint of a cluster. |