Help Center > > FAQs> Database Connection> How Can I Obtain the IP Address of an Application?

How Can I Obtain the IP Address of an Application?

Updated at: May 26, 2020 GMT+08:00

Scenarios

EIPs obtained through tools are inaccurate. Therefore, applications may fail to be connected to DB instances even though you have added IP addresses to a whitelist. This section describes how to obtain IP addresses of applications.

Procedure

  1. Add IP addresses or IP address ranges that are allowed to access DB instances to the RDS whitelist.
  2. Use the MySQL client to connect to an RDS MySQL DB instance.

    mysql -h host_name -P port -u username -p

    Enter the password of the database account if the following information is displayed:

    Enter password:

    For example, run the following command as user root to connect to a DB instance:

    mysql -h 172.16.0.31 -P 3306 -u root -p

    Enter password:

  3. Query process information.

    show processlist

    Figure 1 shows the query result. The outbound IP address is the host IP address in the "show processlist" row of the Info field.

    Figure 1 IP query result

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel