查看审计状态
show variables like '%audit%';
如果没有,则先查看审计插件目录
SHOW VARIABLES LIKE 'plugin_dir';
启用审计
# * Audit Settings
#
plugin-load=server_audit=server_audit.so
server_audit=FORCE_PLUS_PERMANENT
server_audit_events=CONNECT,QUERY,TABLEserver_audit_logging=ON
重启
service restart mysql