Log aborted connections problem

Hello,

I would like to log aborted connections in my MySQL 5.1 Server. According to related doc (MySQL :: MySQL 5.1 Reference Manual :: 5.1.2 Server Command Options) I modified log-warnings variable to 2.
mysql> show variables like ‘log_warnings’;
±--------------±------+
| Variable_name | Value |
±--------------±------+
| log_warnings | 2 |
±--------------±------+
1 row in set (0.01 sec)

Then I tested this function with the following command (it tried to connect to database with wrong password):

for (( i = 0; i <= 50; i++ )); do mysql -h localhost -u testuser -p1123; done
ERROR 1045 (28000): Access denied for user ‘testuser’@‘localhost’ (using password: YES)

I executed this command several times but unfortunately, there is no warning message in error log.

Could you help anyone?

Thanks in advance!

afaik this is not implemented in 5.1 and earlier. see MySQL Bugs: #25822: Log Access Denied errors for bad passwords in the error log