mysql5.7安装审计插件libaudit_plugin.so

1.下载插件:
https://bintray.com/mcafee/mysql-audit-plugin/release/1.1.7-805#files
2.解压插件复制到mysql lib库插件目录下:
unzip audit-plugin-mysql-5.7-1.1.7-805-linux-x86_64.zip
cd audit-plugin-mysql-5.7-1.1.7-805/lib
3.数据库中查看mysql的插件目录:
SHOW GLOBAL VARIABLES LIKE 'plugin_dir'
mysql5.7安装审计插件libaudit_plugin.so
4.拷贝libaudit_plugin.so到mysql插件目录:
cp libaudit_plugin.so /usr/lib64/mysql/plugin/
5.mysql命令行安装libaudit_plugin.so:
mysql5.7安装审计插件libaudit_plugin.so
install plugin audit soname 'libaudit_plugin.so';
6.开启设计功能
mysql5.7安装审计插件libaudit_plugin.so
set global audit_json_file=1;
7.在mysql主目录下会生成审计日志文件:
mysql-audit.json
mysql5.7安装审计插件libaudit_plugin.so

上一篇:SpringMVC源码解析DispatcherServlet#doDispatch方法流程(下)


下一篇:使用阿里的ECS搭建一个FTP服务器