This topic describes how to use the self-service diagnostics feature to diagnose the connections that are established to an ApsaraDB RDS for MySQL instance over the Internet and internal networks.
After you create an RDS instance, you may fail to connect to the RDS instance. In most cases, connection failures may occur due to network connection issues. To quickly troubleshoot connection issues, ApsaraDB RDS for MySQL provides the self-service diagnostics feature.
When you cannot connect to an RDS instance, you can use the self-service diagnostics feature to troubleshoot connection issues.
The self-service diagnostics feature can test the connectivity between the connection initiator and your RDS instance. For example, if the IP address of the connection initiator is not added to the IP address whitelist of your RDS instance, the connectivity test fails.
The self-service diagnostics feature can test whether the IP address of the connection initiator is within a CIDR block that is added to the IP address of your RDS instance. If the IP address of the connection initiator is within the CIDR block, the connectivity test succeeds.
If your RDS instance is deployed in a virtual private cloud (VPC), the Elastic Compute Service (ECS) instance that resides in the same VPC can connect to your RDS instance over an internal network. If the ECS instance and the RDS instance reside in different VPCs, the ECS instance cannot connect to the RDS instance even if the IP address of the ECS instance is added to the IP address whitelist of the RDS instance.
Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region in which your RDS instance resides. Then, find the RDS instance and click the instance ID.
In the left-side navigation pane, click Database Connection.
In the Connection Troubleshooting section, add the private IP address of an Elastic Compute Service (ECS) instance or public IP address of an on-premises device that can be used to connect to your RDS instance.
To add an internal endpoint, click the Intranet Troubleshooting tab and click Add intranet ECS IP. In the dialog box that appears, select the ECS instance that you want to add, add it to the Selected ECS instances section, and then click OK.
To add a public endpoint, click the Extranet Troubleshooting tab, click Add Extranet IP. In the dialog box that appears, enter the IP address or click Load Local Public IP Address (If there is a network proxy on your PC, please turn it off first). Then, click OK.Note
You can obtain the public IP address of your local computer in one-click mode only when the network proxy is disabled.
Click Start Check.
Perform subsequent operations based on different test statuses.
In this case, no action is required.
IP Address Not in the Whitelist
Click Configure Whitelist in the Actions column to add the IP address to the whitelist. For more information, see Configure an IP address whitelist for an ApsaraDB RDS for PostgreSQL instance.
Click Submit Ticket in the Actions column to submit a ticket.
For more information about the self-service diagnostics feature for an RDS instance that runs a different database engine, see the following topics: