Authorization Log for MySQL

March 2, 2015 1.9k views

Does anyone know if there is an authorization log for mysql? I see the error log, but would like to monitor authorization access.


2 Answers

Unfortunately, I don't believe there is a way to log authorization attempts to a separate file. Though if you set log-warnings = 2 in the [mysqld] section of /etc/mysql/my.cnf you'll get failed login attempts logged in the error log. From the docs:

If the value is greater than 1, aborted connections are written to the error log, and access-denied errors for new connection attempts are written.

Have another answer? Share your knowledge.