|
[root@localhost src]# unzip audit-plugin-mysql-5.6-1.1.4-725-linux-x86_64.zip
[root@localhost src]# cd audit-plugin-mysql-5.6-1.1.4-725
#先进下MySQL中看下插件所在的路径
mysql> show variables like '%plugin_dir%';
+---------------+------------------------------+
| Variable_name | Value |
+---------------+------------------------------+
| plugin_dir | /usr/local/mysql/lib/plugin/ |
+---------------+------------------------------+
1 row in set (0.03 sec)
[root@localhost audit-plugin-mysql-5.6-1.1.4-725]# cp lib/libaudit_plugin.so /usr/local/mysql/lib/plugin/
[root@localhost audit-plugin-mysql-5.6-1.1.4-725]# cd /usr/local/mysql/lib/plugin
[root@localhost plugin]# chown mysql:mysql libaudit_plugin.so && chmod +x libaudit_plugin.so
#修改插件的属组和添加权限
[root@localhost plugin]# mysql#再进MySQL中安装插件
mysql> install plugin audit soname 'libaudit_plugin.so';
mysql> show global variables like 'audit%';
mysql> set global audit_json_file = on;
[root@localhost audit-plugin-mysql-5.6-1.1.4-725]# cd utils/
[root@localhost utils]# chmod +x offset-extract.sh
[root@localhost utils]# ./offset-extract.sh /usr/local/mysql/bin/mysqld#初始化
//offsets for: /usr/local/mysql/bin/mysqld (5.6.35)
{"5.6.35","c48fe13e444883af96c7f134cd0c952b", 6992, 7040, 4000, 4520, 72, 2704, 96, 0, 32, 104, 136, 7128, 4392, 2800, 2808, 2812, 536, 0, 0, 6360, 6384, 6368},
|
|
|