I've followed the instructions to enable audit logging for my MySQL 5.7 instance on RDS from these instructions
I would like to only see mutating operations: e.g.: UPDATE, INSERT, DELETE
queries. Based on the above instructions, I should set the SERVER_AUDIT_EVENTS
parameter in the option group to QUERY_DML
. I have done this, keeping all the other default settings, my option group settings looks like this:
Name | Value |
---|
SERVER_AUDIT_EVENTS | QUERY_DML |
SERVER_AUDIT_LOGGING | ON |
SERVER_AUDIT_INCL_USERS | - |
SERVER_AUDIT | FORCE_PLUS_PERMANENT |
SERVER_AUDIT_FILE_ROTATIONS | - |
SERVER_AUDIT_QUERY_LOG_LIMIT | 1024 |
SERVER_AUDIT_FILE_PATH | /rdsdbdata/log/audit/ |
SERVER_AUDIT_FILE_ROTATE_SIZE | - |
SERVER_AUDIT_EXCL_USERS | - |
I assigned this option group to my MySQL database and restarted. I see the audit logs but I still see SELECT
statements. What did I miss to enable only DML audit logging?
Thanks for the answer Riku! I think the documentation for the link I shared needs to be updated to include
QUERY_DML_NO_SELECT
:)