Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know there is a bug in MySQL 5.0 which prevents aborted connections from being logged in the error log (

However, aborted connections should still be logged in the general query log. When I tried configuring the logging for this, I still don't see aborted connections in the general log. Here is the part I configured from my.cnf:

log = /var/log/mysql_general.log

log_warnings = 2

I restarted mysqld after making those changes and then tested by telnetting to the server on port 3306 and then closing the connection. After doing so, I run:

show global status like '%abort%';

And I see the counter increment:

| Variable_name    | Value |
| Aborted_clients  | 0     |
| Aborted_connects | 4     |
2 rows in set (0.00 sec)

However, I see nothing in the general logs. If I enter a bad password, that DOES show up in the logs though. But nothing about aborted connections:

/usr/sbin/mysqld, Version: 5.0.45-community-log (MySQL Community Edition (GPL)). started with:
Tcp port: 0  Unix socket: /var/lib/mysql/mysql.sock
Time                 Id Command    Argument
140126 19:19:57       2 Connect     root@localhost on
                      2 Query       select @@version_comment limit 1
140126 19:20:08       2 Query       show global status like '%abort%'
140126 19:20:11       2 Quit
140126 19:27:29       4 Connect     Access denied for user 'root'@'localhost' (using password: YES)
140126 19:27:48       5 Connect     root@localhost on
                      5 Query       select @@version_comment limit 1
140126 19:27:51       5 Query       show global status like '%abort%'
140126 19:28:01       5 Query       show global status like '%abort%'
140126 19:28:02       5 Quit
140126 23:13:39       7 Connect     root@localhost on
                      7 Query       select @@version_comment limit 1
140126 23:13:42       7 Query       show global status like '%abort%'
140126 23:13:48       7 Quit

So I have no idea what else to try to get this thing logging aborted connections, whether it be the error log, general log, or whatever the heck log. Anyone able to help me out?

share|improve this question
nobody has tried logging aborted connections in mysql 5.0 or 5.1?? – blizz Jan 27 '14 at 17:45

Are you sure that bug applies to your version of MySQL. I don't believe it does. If that's the case then error should be reported in your error logs.

The errors could be getting logged to your syslog unless you have taken measures to ensure that they are not. Check for this in your my.cnf:

# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.

If you don't want it going there, comment out the line in that log file:


and add this to my.cnf:


share|improve this answer
Nope that bug definitely applies to my version cause aborted connections are not being logged in the error log (/var/log/mysqld.log). – blizz Jan 27 '14 at 0:24
And you are certain they aren't being logged to syslog? – Lothar_Grimpsenbacher Jan 27 '14 at 2:22
100% positive - there is no mention of syslog anywhere in my.cnf – blizz Jan 27 '14 at 13:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.