mysql报"Host ""*****"" is blocked because of many connection errors; unblock with "mysqladmin flus...

java.sql.SQLException: null,  message server: "Host ""*****"" is blocked because of many connection errors; unblock with ""mysqladmin flush-hosts""" 

原因:
mysql中默认的max_connect_errors是10,因为连接失误,造成这个数值高于10,当在接受连接的时侯就被锁住了, 并阻止主机的进一步连接请求。

解决:

方法1 命令行或终端:mysqladmin  -u  root  -p  flush-hosts
接着输入root账号密码即可

方法2
修改mysql配置文件,在[mysqld]下面添加 max_connect_errors=1000,然后重启mysql

你可能感兴趣的:(mysql报"Host ""*****"" is blocked because of many connection errors; unblock with "mysqladmin flus...)