ITPub博客

首页 > 数据库 > MySQL > MYSQL_审计日志查看

MYSQL_审计日志查看

原创 MySQL 作者:adamjunior 时间:2020-03-10 15:08:51 0 删除 编辑

1.下载插件libaudit_plugin.so

https://bintray.com/mcafee/mysql-audit-plugin/release/1.1.7-805#files


2. 安装插件

# unzip audit-plugin-percona-5.7-1.1.7-805-linux-x86_64.zip

# cd /u01/soft/audit-plugin-percona-5.7-1.1.7-805/lib

# cp libaudit_plugin.so /usr/local/mysql/lib/plugin/     

# cd  /usr/local/mysql/lib/plugin/

# chown mysql:mysql libaudit_plugin.so 

# chmod 755 libaudit_plugin.so 


# cd /u01/soft/audit-plugin-percona-5.7-1.1.7-805/utils

# ./offset-extract.sh /usr/local/mysql/bin/mysqld


修改/etc/my.conf

添加内容如下:

plugin-load=AUDIT=libaudit_plugin.so

audit_offsets=7824, 7872, 3632, 4792, 456, 360, 0, 32, 64, 160, 536, 7988, 4360, 3648, 3656, 3660, 6072, 2072, 8, 7056, 7096, 7080, 13464, 148, 672


3.重启数据库

# service mysqld stop

# service mysqld start

mysql> install plugin audit soname 'libaudit_plugin.so';

ERROR 1125 (HY000): Function 'audit' already exists


4. 检查插件

mysql> show plugins;

| AUDIT                      | ACTIVE   | AUDIT              | libaudit_plugin.so | GPL 




来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959726/viewspace-2679429/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: ORACLE_19C_ADG搭建
请登录后发表评论 登录
全部评论
三年之病,求七年之艾。岂可得之?

注册时间:2020-01-14

  • 博文量
    23
  • 访问量
    26395