content_image/753924.jpg content_image/753925.jpg content_image/753940.jpg
•A set of functions enables manipulation of filtering definitions that control logging behavior, the encryption password, and log file reading. 

•Tables in the mysql  system database provide persistent storage of filter and user account data. 

•System variables enable audit log configuration and status variables provide runtime operational information. 

## 6.4.5.2 Installing or Uninstalling MySQL Enterprise Audit 

•An AUDIT_ADMIN  privilege enable users to administer the audit log. 

This section describes how to install or uninstall MySQL Enterprise Audit, which is implemented using the audit log plugin and related elements described in Section 6.4.5.1, “Elements of MySQL Enterprise Audit” . For general information about installing plugins, see Section 5.6.1, “Installing and Uninstalling Plugins” . 

<img src='content_image/753924.jpg'>

<img src='content_image/753925.jpg'>

## Important 

Read this entire section before following its instructions. Parts of the procedure differ depending on your environment. 

## Note 

If installed, the audit_log  plugin involves some minimal overhead even when disabled. To avoid this overhead, do not install MySQL Enterprise Audit unless you plan to use it. 

To be usable by the server, the plugin library file must be located in the MySQL plugin directory (the directory named by the plugin_dir  system variable). If necessary, configure the plugin directory location by setting the value of plugin_dir  at server startup. 

To install MySQL Enterprise Audit, look in the share  directory of your MySQL installation and choose the script that is appropriate for your platform. The available scripts differ in the suffix used to refer to the plugin library file: 

• audit_log_filter_win_install.sql : Choose this script for Windows systems that use .dll  as the file name suffix. 

• audit_log_filter_linux_install.sql : Choose this script for Linux and similar systems that use .so  as the file name suffix. 

Run the script as follows. The example here uses the Linux installation script. Make the appropriate substitution for your system. 

shell> mysql -u root -p < audit_log_filter_linux_install.sql Enter password: (enter root password here) 

<img src='content_image/753940.jpg'>

## Note 

Some MySQL versions have introduced changes to the structure of the MySQL Enterprise Audit tables. To ensure that your tables are up to date for upgrades from earlier versions of MySQL 8.0, perform the MySQL upgrade procedure, making sure to use the option that forces an update (see Section 2.11, “Upgrading MySQL” ). If you prefer to run the update statements only for the MySQL Enterprise Audit tables, see the following discussion. 

As of MySQL 8.0.12, for new MySQL installations, the USER  and HOST  columns in the audit_log_user  table used by MySQL Enterprise Audit have definitions that better correspond to the definitions of the User  and Host  columns in the 

