3.6.1 How Do I Record Only Login Events? Objectives Example Execution Discussion Permissions Required Tips and Tricks

The audit log plugin records MySQL servers activity. By default, it is set to write all auditable events to the log file which can represent a considerable amount of information. Fortunately, it is possible to control the type of information that is written to the audit log file, changing the audit log plugin's policy. The policy should be set to log only the events of interest, avoiding wasting resources to log unnecessary events.

In particular, if the audit log plugin is only used to monitor access to the database server (for security purposes) then only the login events need to be recorded. The mysqlauditadmin utility allows us to perform such change in a simple way (as well as changes other settings).