MYSQL_审计日志查看

1.下载插件libaudit_plugin.so

为中阳等地区用户提供了全套网页设计制作服务,及中阳网站建设行业解决方案。主营业务为成都网站建设、网站设计、中阳网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!

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

2. 安装插件

MYSQL_审计日志查看

# 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

MYSQL_审计日志查看

修改/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

MYSQL_审计日志查看

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 


当前标题:MYSQL_审计日志查看
标题URL:http://scyanting.com/article/gpegod.html