## 6.4.5.10 Audit Log Reference 

The following sections provide a reference to MySQL Enterprise Audit elements: 

•Audit Log Tables 

•Audit Log Functions 

•Audit Log Option and Variable Reference 

•Audit Log Options and Variables 

•Audit Log Status Variables 

To install the audit log tables and functions, use the instructions provided in Section 6.4.5.2, “Installing or Uninstalling MySQL Enterprise Audit” . Unless those objects are installed, the audit_log  plugin operates in legacy mode. See Section 6.4.5.9, “Legacy Mode Audit Log Filtering” . 

## Audit Log Tables 

MySQL Enterprise Audit uses tables in the mysql  system database for persistent storage of filter and user account data. The tables can be accessed only by users who have privileges for that database. The tables use the InnoDB  storage engine. 

If these tables are missing, the audit_log  plugin operates in legacy mode. See Section 6.4.5.9, “Legacy Mode Audit Log Filtering” . 

The audit_log_filter  table stores filter definitions. The table has these columns: 

• NAME 

The filter name. 

• FILTER 

The filter definition associated with the filter name. Definitions are stored as JSON  values. 

The audit_log_user  table stores user account information. The table has these columns: 

• USER 

The user name part of an account. For an account user1@localhost , the USER  part is user1 . 

• HOST 

The host name part of an account. For an account user1@localhost , the HOST  part is localhost . 

• FILTERNAME 

The name of the filter assigned to the account. The filter name associates the account with a filter defined in the audit_log_filter  table. 

## Audit Log Functions 

This section describes, for each audit log function, its purpose, calling sequence, and return value. For information about the conditions under which these functions can be invoked, see Section 6.4.5.7, “Audit Log Filtering” . 

Each audit log function returns a string that indicates whether the operation succeeded. OK  indicates success. ERROR: message  indicates failure. 

