When you can't connect to an ApsaraDB RDS for MySQL instance, use the self-service diagnostics feature to identify the cause from the console — without opening a support ticket.
How it works
The feature tests connectivity from a source IP you specify to your RDS instance. It checks whether the source IP (or the CIDR block it belongs to) is in the instance's IP address whitelist. If it is, the test passes. If not, the test fails and guides you to add it.
Two paths are supported:
-
Internal network — test connectivity from an Elastic Compute Service (ECS) instance in the same virtual private cloud (VPC)
-
Public network — test connectivity from an on-premises device or any external machine over the Internet
Run a connectivity test
-
Log on to the ApsaraDB RDS console. In the top navigation bar, select the region where your RDS instance resides, then click the instance ID.
-
In the left-side navigation pane, click Database Connection.
-
In the Connection Troubleshooting section, add the source IP to test:
-
Internal network: Click the Intranet Troubleshooting tab, then click Add intranet ECS IP. In the dialog box, select the ECS instance, add it to the Selected ECS instances section, and click OK.
NoteInternal network testing only works when the ECS instance and RDS instance are in the same VPC. If they are in different VPCs, the ECS instance cannot connect to the RDS instance even if the ECS IP is in the whitelist.
-
Public network: Click the Extranet Troubleshooting tab, then click Add Extranet IP. In the dialog box, enter the IP address manually, or click Load Local Public IP Address (If there is a network proxy on your PC, please turn it off first) to detect it automatically.
NoteAutomatic IP detection requires the network proxy to be disabled on your local machine.
Click OK.
-
-
Click Start Check.
Review results
| Result | Next step |
|---|---|
| Normal | No action required. |
| IP Address Not in the Whitelist | Click Configure Whitelist in the Actions column to add the IP address to the whitelist. |
| Abnormal | Click Submit Ticket in the Actions column to open a support ticket. |