1.下載插件libaudit_plugin.so
10年建站經(jīng)驗(yàn), 成都網(wǎng)站制作、成都網(wǎng)站建設(shè)客戶的見證與正確選擇。成都創(chuàng)新互聯(lián)公司提供完善的營銷型網(wǎng)頁建站明細(xì)報(bào)價(jià)表。后期開發(fā)更加便捷高效,我們致力于追求更美、更快、更規(guī)范。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
添加內(nèi)容如下:
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.重啟數(shù)據(jù)庫
# 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