Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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, 5.6, 5.7), MariaDB (5.5, 10.0, 10.1, 10.2), and Percona (5.7.19) according to platform (32 or 64 bit). Please note:
- The binary for MariaDB 10.2 is for 10.2.10 and later.
- Only 64-bit binaries are supplied for Percona.
The Plugin file is available in the zip binary distribution under the lib dir. File name: libaudit/_plugin.so. To install the 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';