Percona mysql 5.6审计日志功能
https://www.percona.com/blog/2014/05/16/introduction-to-the-percona-mysql-audit-log-plugin/
http://my.oschina.net/anthonyyau/blog/296650
[mysqld]
plugin-load="audit_log=audit_log.so"
INSTALL PLUGIN audit_log SONAME 'audit_log.so';
show plugins;
show global variables like 'audit%';
audit_log_rotate_on_size参数表示超过定义的值,会自动轮训,切分日志。
audit_log_rotations参数限制表示文件的数量。
## Audit Logging ##
audit_log_policy=ALL
audit_log_format=JSON
audit_log_file=/var/log/mysql/audit.log
audit_log_rotate_on_size=1024M
audit_log_rotations=10
audit_log_strategy:设置审计日志策略,ASYNCHRONOUS(默认,使用内存buffer,如果buffer满,不删除消息),PERFORMANCE(使用内存buffer,如果buffer满删除消息),SEMISYNCHRONOUS(日志直接到文件,没有刷新和同步),