1.去maridb官网下载插件,上传到mysql服务器,解压
2.登录mysql服务器,SHOW VARIABLES LIKE 'plugin_dir';
3.把插件cp 到plugindir目录下,安装一下(INSTALL PLUGIN server_audit SONAME 'server_audit.so;)
4.vi /etc/my.cnf
server_audit_logging
server_audit_events=connect,query(可选)
5.重启mysql
6.查看审计日志放到哪里了
server_audit_file_path
参考:
阅读(3420) | 评论(0) | 转发(0) |