Clone this wiki locally
Download the latest binary release from: https://bintray.com/mcafee/mysql-audit-plugin/release.
Development snapshot builds are available at: https://bintray.com/mcafee/mysql-audit-plugin/dev-snapshot (follow the latest version link and then the "Files" link). These builds are right off the trunk. They are usually stable, but do have a higher chance of containing new bugs.
Make sure to download the proper binary distribution. There are separate binaries for MySQL 5.1, 5.5. and 5.6 according to platform (32 or 64 bit).
The Plugin file is available in the zip binary distribution under the lib dir. File name: libaudit_plugin.so. To install AUDIT Plugin, copy libaudit_plugin.so to the plugin_dir (for example /usr/lib/mysql/plugin or /usr/lib64/mysql/plugin ) of MySQL.
To see the configured plugin dir, login to MySQL and issue the following command:
show global variables like 'plugin_dir';
There are 2 options for installing the plugin via plugin-load configuration option or by issuing the INSTALL PLUGIN statement.
Installing via: plugin-load
Add to the MySQL option file (my.cnf) at the [mysqld] section the option:
Restart the mysqld server for the changes to take effect.
Installing via: INSTALL PLUGIN
You will need to issue the following sql command to install the plugin:
INSTALL PLUGIN AUDIT SONAME 'libaudit_plugin.so';
A restart to the mysqld server is not necessary.
Note: On production systems, McAfee recommends using the plugin-load option for installing the audit plugin.
More info on installing MySQL plugins is available at: http://dev.mysql.com/doc/refman/5.1/en/plugin-installing-uninstalling.html
To check if the plugin is installed successfully you can issue the following command, which will show all installed plugins:
The AUDIT plugin will show up with the name AUDIT. Additionally you can verify the version of the AUDIT Plugin by running the following command:
show global status like 'AUDIT_version';