3.5.1 How Do I Record Only Login Events?

3.5.1.1 Objectives
3.5.1.2 Example Execution
3.5.1.3 Discussion
3.5.1.4 Permissions Required
3.5.1.5 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).