mysql install libaudit_plugin.so audit plug-in

 

One, download the plug-in

https://bintray.com/mcafee/mysql-audit-plugin/release/1.1.7-805#files

 The decompressed content is shown in the figure:

2. Execute the offset-extract.sh script, the parameter is the full path of mysqld

Three, modify my.cnf configuration

[mysqld]
plugin-load=AUDIT=libaudit_plugin.so
audit_offsets=7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13472, 148, 672
audit_json_file=1

Fourth, restart mysql

Five, query the plug-in installation

1、show plugins;

2、show status like "%audit%";

3、show variables like "%audit%";

If audit_json_file is OFF, you need to execute set global audit_json_file=1 to open the audit file

Six, check the contents of the audit file

Audit file location: /usr/local/mysql/data/mysql-audit.json

Go to see if the file is generated, and check the contents.

 

Guess you like

Origin blog.csdn.net/sumengnan/article/details/114161363