Skip to content

Installation

guylichtman edited this page Jul 18, 2012 · 8 revisions

Download the latest binary release from: https://github.com/mcafee/mysql-audit/downloads

Make sure to download the proper binary distribution. There are separate binaries for MySQL 5.1 and MySQL 5.5 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:

plugin-load=AUDIT=libaudit_plugin.so 

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

Verification

To check if the plugin is installed successfully you can issue the following command, which will show all installed plugins:

show 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';

Troubleshooting

See: Troubleshooting

Clone this wiki locally