How Can I Obtain the IP Addreenabled SQL auditss of an Application?
Scenario
EIPs obtained through tools are inaccurate. Therefore, applications still cannot be connected to RDS DB instances even though you have added IP addresses to a whitelist. This section describes how to obtain a local IP address.
Procedure
- Add IP addresses or IP address ranges that are allowed to access DB instances to the RDS whitelist.
- Use the MySQL client to connect to an RDS for MySQL DB instance.
mysql -h host_name -P port -u username -p
Enter the password of the database account if the following information is prompted:
Enter password:
For example, if you 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:
- 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.
- View historical connection sources in audit logs if you have enabled SQL audit.
If this function is disabled, historical records cannot be viewed.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot