This topic describes common causes for the failures in connecting Data Management (DMS) and common MySQL clients to ApsaraDB PolarDB MySQL-compatible edition clusters and provides solutions for the connection failures.

A whitelist that is not configured or is incorrectly configured for a cluster

Causes:
  • The default whitelist of a PolarDB cluster contains only the IP address 127.0.0.1. This indicates that no IP addresses are allowed to access the cluster. The IP addresses of the clients that require access to a cluster are not added to the whitelist of the cluster.
  • The format of the IP addresses that are specified in the whitelist is 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 to 0.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.

A private endpoint or a public endpoint that is incorrectly used

Cause: A private endpoint or a public endpoint is incorrectly used.

Solution: Make sure that you use the correct endpoint to connect to your cluster. If you want to connect to the PolarDB cluster over a virtual private cloud (VPC), use a private endpoint of the PolarDB cluster. If you want to connect to 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 the ECS instance from the classic network to the VPC. For more information, see Migrate ECS instances.
    Note After the network type is changed, the ECS instance and the PolarDB cluster must be deployed in the same VPC. This way, the ECS instance and the cluster can 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.