The docs for 5.1 say that I can set log_warnings = 2
to capture Aborted_connects
in the error log. This bug report suggests that this was only merged into 5.5 and 6.0 (and maybe 5.2) but not into 5.1.
I tried out all combinations of set global log_warnings = 2;
and set global log_warnings = 1;
followed by login attempts with valid and invalid users and invalid and no passwords results in nothing in the error log.
- Are the docs incorrect or have I made a mistake somewhere?
- Do other types of aborted connections (such as a loss of network during the login or improper permissions for the database) get logged in the error log?
- Do aborted clients get logged in the error log?
Some other things I have checked/done:
log_error
is set to/var/log/mysql/error.log
.- That file exists and the
mysqld
process has it open. - The last entry in it is from 2012/06/01.
skip-log-warnings
is not set inmy.cnf
and the process was started with no arguments.skip_log_warnings
does not exist inSHOW GLOBAL VARIABLES LIKE '%skip%'
- The uptime of MySQL is 50 days.
- I ran
FLUSH LOGS
just in case. - The version string is
5.1.62-0ubuntu0.10.04.1-log
. - The
Aborted_connects
value is increasing by one every time I try an invalid connection attempt.
Best Answer
This seems to be an elusive bug nobody wants to fix
According to http://bugs.mysql.com/bug.php?id=24761, the aborted connect is recorded in the general log
We just have to wait on MySQL (I mean Oracle) to fix it. (That was sarcasm)