This topic describes common causes for failures to connect Data Management (DMS) and common MySQL clients to PolarDB for MySQL clusters and provides solutions for these failures.
A whitelist that is not configured or is incorrectly configured for a cluster
Causes:
The default whitelist contains only the IP address
127.0.0.1
, which indicates that no IP addresses are allowed to access the PolarDB cluster. The IP addresses of the clients that require access to a cluster are not added to the whitelist of the cluster.The formats of the IP addresses that are specified in the whitelist are invalid.
The public IP addresses that are added to the whitelist of a cluster are not the outbound IP addresses of the clients that require access to the cluster.
Solutions:
Add the IP addresses of the clients that require access to the cluster to the whitelist of the cluster. For more information, see Configure an IP whitelist.
Specify IP addresses for the whitelist in a valid format. For example, change
0.0.0.0
to0.0.0.0/0
.Obtain the correct public IP addresses of the clients that require access to the cluster and add the correct public IP addresses to the whitelist of the cluster.
For more information, see Troubleshoot issues related to an IP whitelist.
No database accounts are created or the current account does not have permission to access the database
Causes:
No database accounts are created.
The current account does not have permission to access the database.
Solutions:
Create a database account in the PolarDB cluster and grant the account permission to access the database. For more information, see Create a database account.
Modify the permissions of the current database account in the PolarDB cluster. For more information, see Reset permissions of the privileged account and Modify the permissions of a standard account.
A private or public endpoint that is incorrectly used
Cause: A private or public endpoint is incorrectly used.
Solution: Make sure that you use the correct endpoint to connect to your cluster. If you want to access the PolarDB cluster over a virtual private cloud (VPC), use a private endpoint of the PolarDB cluster. If you want to access the PolarDB cluster over the Internet, use a public endpoint of the PolarDB cluster.
Network type mismatch
Cause: The network type of the Elastic Compute Service (ECS) instance to which your PolarDB cluster is connected is different from that of your cluster. The ECS instance is deployed in the classic network, and the PolarDB cluster is deployed in a VPC.
Solutions
We recommend that you migrate your ECS instance from the classic network to a VPC. For more information, see Migrate ECS instances from a classic network to a VPC.
NoteYour ECS instance and PolarDB cluster must be deployed in the same VPC. Otherwise, they cannot communicate with each other over the VPC.
Use the ClassicLink feature to establish an internal network connection between the ECS instance in the classic network and the PolarDB cluster in the VPC.
Use the public endpoint of the PolarDB cluster to connect the ECS instance to the cluster over the Internet. This solution does not provide optimal performance or high security and stability.