This topic provides answers to some frequently asked questions about connections in AnalyticDB for MySQL.
If no edition is specified in a question, the question applies only to AnalyticDB for MySQL Data Warehouse Edition clusters.
FAQ overview
What do I do if a whitelist configuration error causes a connection failure?
Why am I unable to use the EasySwoole framework to connect to AnalyticDB for MySQL?
How do I check the user or client IP address from which burst connections are established?
What is the maximum number of connections that are allowed for an AnalyticDB for MySQL cluster?
What do I do if a whitelist configuration error causes a connection failure?
No IP address whitelist is configured.
Configure IP address whitelists. For more information, see IP address whitelists.
An incorrect client egress IP address is added to an IP address whitelist.
Client egress IP addresses are used to access external gateways in the local network environment of clients. The client egress IP addresses may not be the on-premises IP addresses of clients. You can use one of the following methods to obtain the correct client egress IP addresses:
Contact the network administrator of the network environment in which the client is located.
If you want to connect to AnalyticDB for MySQL in the same virtual private cloud (VPC) over an internal network, the IP address of the Elastic Compute Service (ECS) instance on which the client runs or the CIDR blocks of the VPC must be added to the IP address whitelists.
NoteTo obtain the CIDR blocks of the VPC, log on to the AnalyticDB for MySQL console and view the VPC ID on the Cluster Information page. Then, log on to the VPC console and find the VPC ID on the VPC page to obtain the CIDR blocks of the VPC.
If you want to connect to AnalyticDB for MySQL over the Internet, you can obtain the egress IP addresses of the client by using a third-party tool.
Enter
https://www.ip138.com/
in your browser. The egress IP addresses of the client are displayed on the web page.Run the
curl "http://myip.ipip.net"
command on the client CLI to obtain the egress IP addresses of the client.
Not all client egress IP addresses are added to IP address whitelists.
In most cases, a client has more than one egress IP address. If you use a third-party tool to obtain IP addresses, we recommend that you run the
curl "http://myip.ipip.net"
command several times to obtain all egress IP addresses of the client.If you want to add a large number of IP addresses to an IP address whitelist, you can use CIDR blocks that have the 0/24 suffix. For example, you can change 192.168.0.1 to 192.168.0.0/24.
The Internet access is enabled and the public IP address can be pinged, but a Java Database Connectivity (JDBC) connection fails.
Run the curl ipinfo.io/ip
command to obtain the public IP address. Add the IP address to an IP address whitelist.
If the required JDBC connection for a query is closed during the query, is the query terminated on the server?
If the query is asynchronously submitted by using the SUBMIT JOB
, INSERT INTO SELECT
, or CREATE TABLE AS SELECT
statement, the query continues. Otherwise, the query is terminated.
If a JDBC connection remains open when the client times out, are the server resources immediately released?
Yes, the server resources are immediately released.
Why am I unable to use the EasySwoole framework to connect to AnalyticDB for MySQL?
This issue occurs because SHOW statements are not supported in PreparedStatement.
How do I check the user or client IP address from which burst connections are established?
Log on to the AnalyticDB for MySQL console. Find the Data Warehouse Edition cluster that you want to manage and click the cluster ID. In the left-side navigation pane, click Diagnostics and Optimization. On the page that appears, click the Connection Information tab to view the Number of User Connections and Number of Connections to Client IP Address parameters.
What is the maximum number of connections that can be established to an AnalyticDB for MySQL cluster?
The number of connections that can be established to an AnalyticDB for MySQL cluster is not limited but varies based on the cluster specifications. We recommend that you establish no more than 50,000 connections to a cluster. Low-specification clusters cannot support excessive connections due to insufficient resources. For more information, see Limits.