MySQL audit function

Auditing is a very important part of database security. It can record database operations in real time and help database administrators to analyze and audit abnormal database behaviors. Audits detail who performed what and when. MySQL Community edition does not have built-in auditing functions or plug-ins. Only MySQL Commercial edition has auditing functions. The audit logs are as follows:

<AUDIT_RECORD
    "NAME= """XXX"// Operation type"RECORD= """XXX" 
    "TIMESTAMP= """XXXX"//"COMMAND_CLASS= """XXX"// Operation type"CONNECTION_ID= """XXX"/ / linksid
    "STATUS= """XXX"
    "SQLTEXT= """XXXX"/ / executionsql
    "USER= """XXXX"// The account of the operation"HOST= """XXX","OS_USER= """"
    "IP= """"
Copy the code

Second, third-party audit plug-in

The plug-in instructions
Percona audit plug-in audit log This plug-in is a built-in audit plug-in of Percona. It is not highly compatible and needs to be adapted
MariaDB Server audit Mariadb_5.5.37 and later mariadb_10.0.10 support MariaDB, MySQL, and Percon Server.
Mcafee audit plugin libaudit_plugin This plug-in is an open source plug-in developed based on Percona.