Although AnalyticDB for MySQL clusters have no hard connection limit, excessive connections on low-spec clusters can exhaust system resources and disrupt service. You can view the number of connections to an AnalyticDB for MySQL Data Warehouse Editioncluster in the console or using SQL statements.
Notes
The console and SQL statements show only the current connections and client IPs — queries for historical data are not supported.
View connections in the console
Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters. Find the cluster that you want to manage and click the cluster ID.
In the navigation pane on the left, click .
Click the Connection Information tab.
You can view the users, client IPs, and number of connections for the cluster.
View connections using SQL statements
Use the INFORMATION_SCHEMA.KEPLER_CONNECTION_INFO_MERGED table to view connection information. This information includes the users, client IPs, and number of connections for the Data Warehouse Edition cluster.
Query the total number of connections
SELECT COUNT(*) FROM INFORMATION_SCHEMA.KEPLER_CONNECTION_INFO_MERGED;The following result is returned:
+-----------+
| count(*) |
+-----------+
| 9 |
+-----------+Query the number of connections established by each user
SELECT COUNT(*) AS connection_count, user FROM INFORMATION_SCHEMA.KEPLER_CONNECTION_INFO_MERGED GROUP BY user ORDER BY connection_count DESC;The following result is returned:
+----------------+--------+
|connection_count| user |
+----------------+--------+
| 4 | kepler |
+----------------+--------+
| 4 | test |
+----------------+--------+
| 1 | aurora |
+----------------+--------+Query the number of connections established by each client
SELECT COUNT(*) AS connection_count, access_ip FROM INFORMATION_SCHEMA.KEPLER_CONNECTION_INFO_MERGED GROUP BY access_ip ORDER BY connection_count DESC;The following result is returned:
+----------------+---------------+
|connection_count| access_ip |
+----------------+---------------+
| 4 | 192.168.XX.XX |
+----------------+---------------+
| 3 | 100.104.XX.XX |
+----------------+---------------+
| 1 | 100.104.XX.XX |
+----------------+---------------+
| 1 | 100.104.XX.XX |
+----------------+---------------+