我有以下情况:
MySQL server: IP: 192.168.0.1 user: testing pass: testing123123 MySQL client #1: IP: 192.168.0.2 MySQL client #2: IP: 192.168.0.3
进入MySQL服务器:
GRANT ALL PRIVILEGES ON *.* TO testing@'192.168.0.2' IDENTIFIED BY 'testing123123'; flush privileges;
客户端#1被授予,客户端#2不被授予。
然后在Client#1 shell中:
mysql -h192.168.0.1 -uuser_bla_bla -pbla_bla_bla ERROR 1045 (28000): Access denied for user 'user_bla_bla'@'192.168.0.2' (using password: YES)
进入Mysql服务器日志:
2017-03-11 12:13:10 82588 [Warning] Access denied for user 'user_bla_bla'@'192.168.0.2' (using password: YES)
一切正常:错误的用户名/密码>>访问被拒绝>>logging日志
现在客户端#2shell:
mysql -h192.168.0.1 -uuser_bla_bla -pbla_bla_bla ERROR 1130 (HY000): Host '192.168.0.3' is not allowed to connect to this MySQL server
进入Mysql服务器日志: 没有!
我的my.cnf:
[mysqld] log_warnings = 2 log_error=/var/log/mysql_error.log
MySQL日志不logging“主机不允许”,它只logging“拒绝访问用户”。
问题:如何loginMySQL“主机不允许”情况?
谢谢!