- 184.108.40.206 Installing the Audit Log Plugin
- 220.127.116.11 Audit Log Plugin Security Considerations
- 18.104.22.168 The Audit Log File
- 22.214.171.124 Audit Log Plugin Logging Control
- 126.96.36.199 Audit Log Plugin Option and Variable Reference
- 188.8.131.52 Audit Log Plugin Options and Variables
- 184.108.40.206 Audit Log Plugin Status Variables
- 220.127.116.11 Audit Log Plugin Restrictions
MySQL Enterprise Audit is an extension included in MySQL Enterprise Edition, a commercial product. To learn more about commercial products, see http://www.mysql.com/products/.
As of MySQL 5.7.9, MySQL Enterprise Edition includes MySQL
Enterprise Audit, implemented using a server plugin named
audit_log. MySQL Enterprise Audit uses the open
MySQL Audit API to enable standard, policy-based monitoring and
logging of connection and query activity executed on specific
MySQL servers. Designed to meet the Oracle audit specification,
MySQL Enterprise Audit provides an out of box, easy to use
auditing and compliance solution for applications that are
governed by both internal and external regulatory guidelines.
When installed, the audit plugin enables MySQL Server to produce a log file containing an audit record of server activity. The log contents include when clients connect and disconnect, and what actions they perform while connected, such as which databases and tables they access.
After you install the plugin (see
Section 18.104.22.168, “Installing the Audit Log Plugin”), it writes an
audit log file. By default, the file is named
audit.log in the server data directory. To
change the name of the file, set the
audit_log_file system variable at
Audit log file contents are not encrypted. See Section 22.214.171.124, “Audit Log Plugin Security Considerations”.
The audit log file is written in XML, with auditable events
<AUDIT_RECORD> elements. To
select the file format, set the
audit_log_format system variable
at server startup. For details on file format and contents, see
Section 126.96.36.199, “The Audit Log File”.
To control what information
audit_log writes to
its log file, set the
audit_log_policy system variable.
By default, this variable is set to
all auditable events), but also permits values of
QUERIES to log
only login or query events, or
NONE to disable
For more information about controlling how logging occurs, see Section 188.8.131.52, “Audit Log Plugin Logging Control”. For descriptions of the parameters used to configure the audit log plugin, see Section 184.108.40.206, “Audit Log Plugin Options and Variables”.
audit_log plugin is enabled, the
Performance Schema (see Chapter 21, MySQL Performance Schema) has
instrumentation for the audit log plugin. To identify the relevant
instruments, use this query:
SELECT NAME FROM performance_schema.setup_instruments WHERE NAME LIKE '%/alog/%';