MySQL DB Auditlog issue

I have Mysql instance with audit log enabled.
Below is a line from audit.log . Here if you see , the db is shown empty. for few entries, I have seen db is populated correctly in the audit.log file

{“audit_record”:{“name”:“Query”,“record”:“1557033666_2022-05-16T10:48:25”,“timestamp”:“2022-05-19T10:12:24Z”,“command_class”:“select”,“connection_id”:“12”,“status”:0,“sqltext”:“SELECT DriversLicenseIDNumber FROM data1”,“user”:“root[root] @ localhost ”,“host”:“localhost”,“os_user”:“”,“ip”:“”,“db”:“”}}

A good audit log as below:

{“audit_record”:{“name”:“Query”,“record”:“1557076254_2022-05-16T10:48:25”,“timestamp”:“2022-05-20T05:22:32Z”,“command_class”:“update”,“connection_id”:“25”,“status”:0,“sqltext”:“UPDATE accountdetails1 SET id= ‘888’ WHERE id= ‘102’”,“user”:“root[root] @ localhost [127.0.0.1]”,“host”:“localhost”,“os_user”:“”,“ip”:“127.0.0.1”,“db”:“test_db”}}

1 Like