I have the following scenario:

MySQL server:
user: testing
pass: testing123123

MySQL client #1:

MySQL client #2:

Into MySQL server:

GRANT ALL PRIVILEGES ON *.* TO testing@'' IDENTIFIED BY 'testing123123';
flush privileges;

Client #1 is granted and Client #2 is NOT granted.

Then in Client #1 shell:

mysql -h192.168.0.1 -uuser_bla_bla -pbla_bla_bla
ERROR 1045 (28000): Access denied for user 'user_bla_bla'@'' (using password: YES)

Into Mysql Server log:

2017-03-11 12:13:10 82588 [Warning] Access denied for user 'user_bla_bla'@'' (using password: YES)

Everything is OK: wrong username/password >> access denied >> log recorded

Now Client #2 shell:

mysql -h192.168.0.1 -uuser_bla_bla -pbla_bla_bla
ERROR 1130 (HY000): Host '' is not allowed to connect to this MySQL server

Into Mysql Server log: NOTHING!

My my.cnf:

log_warnings = 2

MySQL log is not logging "host is not allowed", it only logs "Access denied for user".

QUESTION: How to log MySQL "host is not allowed" cases?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.