MySQL 5.7.12
mariadb 10.1.14
https://mariadb.com/kb/en/mariadb/server_audit-system-variables/
INSTALL PLUGIN server_audit SONAME 'server_audit.so';
# 重要的参数
server_audit_incl_users=''
server_audit_excl_users=''
server_audit_events='QUERY,QUERY_DDL,QUERY_DML,QUERY_DCL,CONNECT'
# 其他参数
server_audit_file_rotate_size=10000000;
# 开启
set global server_audit_logging=1;
# 切换日志路径
set global server_audit_logging=0, server_audit_file_path='new path';
set global server_audit_logging=1;
标题名称:mysql使用mariadb审计插件
URL标题:
http://kswsj.cn/article/jdpggd.html