You can use a cluster endpoint or a primary endpoint of a PolarDB cluster to connect to the cluster. This topic describes how to apply for and manage a cluster endpoint or a primary endpoint.
Apply for a cluster endpoint or a primary endpoint
Create a custom cluster endpoint
In the Endpoints section of the Overview page, click Create Custom Cluster Endpoint. In the dialog box that appears, create a custom cluster endpoint and configure the features provided by the PolarDB proxy for the custom cluster endpoint. For more information, see Configure PolarProxy.
View an endpoint
You can view the domain name and port number of an endpoint by using one of the following
methods:
- In the upper-right corner of the Endpoints section, click the
icon to switch the view. Then, you can view the domain name and port number of the endpoint.
- On the right side of the cluster endpoint, click Modify. In the Network Information section of the dialog box that appears, you can view the domain name and port number
of the endpoint.
Note
- If you use a domain name to connect to a database, you can click Bind Private Domain to bind the domain name to a private endpoint. This allows you to retain the original database domain name after the database is migrated to the cloud. Only VPC-facing Endpoint endpoints can be bound to private domain names. For more information, see Private domain names.
- The default port number of an endpoint that is used by an PolarDB for MySQL cluster is 3306. You can change the port number. For more information, see Modify an endpoint.
Modify an endpoint
You can change the domain name and port number for an endpoint by using one of the
following methods:
- In the upper-right corner of the Endpoints section, click the
icon to switch the view. Then, find the endpoint that you want to manage and click Modify.
- On the right side of the cluster endpoint, click Modify. In the Network Information section of the dialog box that appears, choose .
Notice
- The 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 lowercase letter and end with a digit or a lowercase letter.
- The port number ranges from 3000 to 3500.
- If SSL is enabled for the endpoint, the cluster restarts after you modify the endpoint.
- If SSL is enabled for the endpoint, the total length of the new endpoint cannot exceed 64 characters.
Delete an endpoint
Warning
- Before you delete an endpoint, make sure that your application is connected to the cluster by using another endpoint.
- A deleted endpoint cannot be recovered. If you need an endpoint, click Apply to apply for a new endpoint. For more information, see Apply for a cluster endpoint or a primary endpoint.
- The default cluster endpoint can be modified but cannot be deleted. Custom cluster endpoints can be deleted.
You can delete an endpoint by using one of the following methods:
- In the upper-right corner of the Endpoints section, click the
icon to switch the view. Then, find the endpoint that you want to manage and click Delete.
- On the right side of the cluster endpoint, click Modify. In the Network Information section of the dialog box that appears, choose .
Note You can delete only Public-facing Endpoint endpoints.
What to do next
Related API operations
API | Description |
---|---|
DescribeDBClusterEndpoints | Queries the endpoints of a specified PolarDB cluster. |
CreateDBEndpointAddress | Creates a public endpoint for a specified PolarDB cluster. |
ModifyDBEndpointAddress | Modifies the default endpoint of a specified PolarDB cluster. |
DeleteDBEndpointAddress | Deletes a cluster endpoint of a specified PolarDB cluster. |