2015-05-17 14:50:38 1896 [Warning] Host name 'hn.kd.ny.adsl' could not be resolved: No such host is known.
2015-05-18 00:11:23 1896 [Warning] IP address '222.186.21.38' could not be resolved: The requested name is valid, but no data of the requested type was found.
2015-05-18 12:12:57 1896 [Warning] Hostname 'unassigned.psychz.net' does not resolve to '216.99.158.181'.
2015-05-18 12:12:57 1896 [Note] Hostname 'unassigned.psychz.net' has the following IP addresses:
2015-05-18 12:12:57 1896 [Note] - 199.15.112.8
2015-05-18 15:12:41 1896 [Warning] Hostname 'unassigned.psychz.net' does not resolve to '216.99.158.158'.
2015-05-18 15:12:41 1896 [Note] Hostname 'unassigned.psychz.net' has the following IP addresses:
2015-05-18 15:12:41 1896 [Note] - 199.15.112.8
2015-05-19 16:27:21 1896 [Warning] Host name 'hn.kd.ny.adsl' could not be resolved: No such host is known.
答案1
在您的my.cnf
[mysqld]
skip-host-cache
skip-name-resolve
这两个变量不是全球的所以需要service mysql restart
在那之后
如果你想阻止对端口 3306 (MySQL) 的所有连接,并且只允许你想要的连接
$ iptables -N mysql
$ iptables -A mysql --src 1.1.1.1 -j ACCEPT
$ iptables -A mysql -j DROP
$ iptables -I INPUT -m tcp -p tcp --dport 3306 -j mysql
其中 1.1.1.1 是您要添加的 IP 地址白名单