All Products
Search
Document Center

PolarDB:Manage the endpoints of a cluster

更新時間:Jul 09, 2024

You can use a cluster endpoint or the primary endpoint of a PolarDB cluster to connect to the cluster. This topic describes how to apply for and manage cluster endpoints or primary endpoints.

View the endpoint and port number

  1. Log on to the PolarDB console.

  2. In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.

  3. Find the cluster and click its ID.

  4. In the Database Connections section of the Basic Information page, move the pointer over the endpoint to view the Network Information in the dialog box that appears, including the endpoint and port number.

    image

Note
  • If 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 allows you to retain the original database domain name after the database is migrated to the cloud. Only Private 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 a PolarDB cluster is 3306. You can change the port number. For more information, see Change the endpoint of a cluster.

Apply for a public cluster endpoint or a primary endpoint

  1. Log on to the PolarDB console.

  2. In the upper-left corner, select the region where the cluster to which you want to connect is deployed.

  3. Find the cluster and click its ID.

  4. In the Database Connections section of the Basic Information page, find the endpoint and click Apply on the right of Public.

    image

    Note

    You can apply only for Public endpoints. After you create a cluster, a default Private endpoint is generated. You do not need to apply for this endpoint.

  5. In the dialog box that appears, specify a prefix for the endpoint and click OK.

    Note

    The prefix of the endpoint must meet the following requirements:

    • It must be 6 to 40 characters in length and can contain lowercase letters, digits, and hyphens (-).

    • It must start with a lowercase letter and end with a digit or letter.

    After an application for the cluster endpoint is approved, all features that can be provided by PolarProxy are supported. You can modify the parameter settings of the features provided by PolarProxy based on your business requirements. For more information, see Configure PolarProxy.

Create a custom cluster endpoint

In the Database Connections section of the Basic Information page, click Create Custom Cluster Endpoint. In the dialog box that appears, create a custom cluster endpoint and configure the features provided by PolarProxy for the custom cluster endpoint. For more information, see Configure PolarProxy.

image

Note

PolarDB for MySQL Cluster Edition allows you to specify a VPC and a vSwitch when you create an endpoint. For more information, see Change the VPC and vSwitch for a PolarDB for MySQL cluster.

Change the endpoint of a cluster

In the Database Connections section of the Basic Information page, find the endpoint and click image > Edit on the right of Private or Public to modify the endpoint.

image

Important
  • The prefix of the endpoint must meet the following requirements:

    • It must be 6 to 40 characters in length and can contain lowercase letters, digits, and hyphens (-).

    • It must start with a lowercase letter and end with a digit or letter.

  • The port number ranges from 3000 to 5999.

  • 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.

Note

PolarDB for MySQL Cluster Edition allows you to change the VPC and vSwitch of a single endpoint. For more information, see Change the VPC and vSwitch for a PolarDB for MySQL cluster.

Delete an endpoint

Important
  • Before you delete an endpoint, make sure that your application is connected to the cluster by using another endpoint.

  • The deleted endpoint cannot be restored. You can click Apply next to the required endpoint type in the console to apply for a new endpoint.

  • The default cluster endpoint can be modified but cannot be deleted. Custom cluster endpoints can be deleted.

In the Database Connections section of the Basic Information page, find the endpoint and click image > Release on the right of Public to release the endpoint.

image

Note

Only Public endpoints can be released.

What to do next

Connect to a cluster

Related API operations

API

Description

DescribeDBClusterEndpoints

Queries the endpoints of a PolarDB cluster.

CreateDBEndpointAddress

Creates a public endpoint for a PolarDB cluster.

ModifyDBEndpointAddress

Modifies the endpoints of a PolarDB cluster.

DeleteDBEndpointAddress

Deletes the public endpoints of a PolarDB cluster.