MySQL Enterprise Audit • audit_log_filter_set_filter() : Define a filter • audit_log_filter_remove_filter() : Remove a filter • audit_log_filter_set_user() : Start filtering a user account • audit_log_filter_remove_user() : Stop filtering a user account • audit_log_filter_flush() : Flush manual changes to the filter tables to affect ongoing filtering For usage examples and complete details about the filtering functions, see Using Audit Log Filtering Functions, and Audit Log Functions. Audit log filtering functions are subject to these constraints: Alternatively, should you prefer to avoid granting the  SUPER  privilege while still permitting users to access specific filtering functions, “wrapper”  stored programs can be defined. This technique is described in the context of keyring functions in Using General-Purpose Keyring Functions; it can be adapted for use with filtering functions. In legacy mode, filtering can be done based only on event account or status. For details, see Section 6.4.5.9, “Legacy Mode Audit Log Filtering” . Before using the audit log functions, install them according to the instructions provided in Section 6.4.5.2, “Installing or Uninstalling MySQL Enterprise Audit” . The  SUPER  privilege is required to use any of these functions. The audit log filtering functions enable filtering control by providing an interface to create, modify, and remove filter definitions and assign filters to user accounts. Filter definitions are  JSON  values. For information about using  JSON  data in MySQL, see Section 11.5, “The JSON Data Type” . This section shows some simple filter definitions. For more information about filter definitions, see Section 6.4.5.8, “Writing Audit Log Filter Definitions” . When a connection arrives, the audit log plugin determines which filter to use for the new session by searching for the user account name in the current filter assignments: 1503 Using Audit Log Filtering Functions Constraints on Audit Log Filtering Functions •To use any filtering function, the  audit_log  plugin must be enabled or an error occurs. In addition, the audit tables must exist or an error occurs. To install the  audit_log  plugin and its accompanying functions and tables, see Section 6.4.5.2, “Installing or Uninstalling MySQL Enterprise Audit” . •To use any filtering function, a user must possess the  SUPER  privilege or an error occurs. To grant the SUPER  privilege to a user account, use this statement: •The  audit_log  plugin operates in legacy mode if it is installed but the accompanying audit tables and functions are not created. The plugin writes these messages to the error log at server startup: [Warning] Plugin audit_log reported: ’Failed to open the audit log filter tables.’ [Warning] Plugin audit_log reported: ’Audit Log plugin supports a filtering, which has not been installed yet. Audit Log plugin will run in the legacy mode, which will be disabled in the next release.’ GRANT SUPER ON *.* TO  user ;