QuestionQ172

Database Security

Consider this statement, which executes successfully:

mysql> SOURCE /usr/share/mysql-8.0/audit_log_filter_linux_install.sql  

You then reconnect to MySQL and run several queries.

Now review the resulting text content of the \{datadir\}/audit.log file:

Question Image

What must you do for the file to contain visible statement events?

  • A You must read the audit log statements through the Performance Schema.
  • B You must use the audit_log_read() and audit_log_read_bookmark() functions to read the statement events.
  • C You must use the audit_log_filter_set_filter() and audit_log_filter_set_user() functions to specify what to log.
  • D You must add audit_log = ON to the MySQL configuration file and restart MySQL to log statements.
  • E You must wait for the audit log buffer to fill before it will flush to disk.
Explanation

MySQL Enterprise Audit uses rule-based filters. By default, no user accounts have a filter assigned, so auditable statement events are not selected for logging. Define a filter that logs the required events with audit_log_filter_set_filter() and assign it to the applicable user or the default % account with audit_log_filter_set_user().

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!