Host is blocked because of many connection errors

Host  is blocked because of many connection errors

MySQL 出现:Host 'XXXXXX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

max_connect_errors 参数含义:如果某一客户端尝试连接此MySQL服务器,但是失败(如密码错误等等)X次,则MySQL会无条件强制阻止此客户端连接

解决方法:
1、set global max_connect_errors=1000; --可以动态修改

当这一客户端成功连接一次MySQL服务器后,针对此客户端的max_connect_errors会清零。

2、 mysqladmin flush-hosts 或者 mysql>flush hosts;