Problem

  • You have added the public IP address of your computer to the IP address whitelist of the RDS instance. However, your computer cannot access the instance while other devices can.
  • You have added the public IP address of your computer to the IP address whitelist of the RDS instance, but your computer cannot access the instance unless you set the IP address whitelist to 0.0.0.0/0 or your company's address range.
If either of the preceding problems occurs, the public IP address you add to the whitelist of the RDS instance may be incorrect. You need to find the real public IP address of your computer.
Note This topic applies only when you access the RDS instance from a device other than an ECS instance. If you access the RDS instance from an ECS instance, you can find the public and private IP addresses of the ECS instance on the ECS console.

Precautions

If the public IP address of your computer is not fixed and your RDS instance is used in a production environment, we recommend that you use a private connection instead or configure an appropriate IP address range in the whitelist. This is to ensure that the connection remains available even if the public IP address of your computer changes.

Procedure

  1. Add your company's public IP address range or 0.0.0.0/0 to the IP address whitelist of the RDS instance. For more information, see Configure a whitelist for an ApsaraDB RDS for MySQL instance.
    Note 0.0.0.0/0 indicates that all devices are allowed to access the RDS instance. Use the address with caution. If you add 0.0.0.0/0 to the whitelist, we recommend that you remove it from the whitelist immediately once you no longer need it.
  2. Connect your computer to the RDS instance by using a client or the command line interface (CLI).
    mysql -h<RDS Connection address> -u<Username> -p<Password> -P3306
  3. Check the process information.
    show processlist

    As shown in the following figure, the value of Host for the show processlist record is the real public IP address of your computer.

  4. Remove 0.0.0.0/0 from the whitelist and add the real public IP address of your computer to the whitelist.