数据库
首页 > 数据库> > ERROR "Host is blocked because of many connection errors; unblock with 'mysqladmin flus

ERROR "Host is blocked because of many connection errors; unblock with 'mysqladmin flus

作者:互联网

ERROR com.alibaba.druid.pool.DruidDataSource - create connection SQLException,

url: jdbc:mysql://hadoop108:3306/FlinkEtl?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT&useSSL=false,

errorCode 1129,

state HY000
java.sql.SQLException: null,

message from server: "Host '192.168.200.108' is blocked

because of many connection errors;

unblock with 'mysqladmin flush-hosts'"

 


【方法一】 进入数据库将 max_connection_errors 参数调高, 也可以在my.cnf文件中修改不过需要重启MySQL。 查看该属性设置为多大 show global variables like '%max_connect_errors%'; 当客户端连接服务端超时(超过connect_timeout), 服务端就会给这个客户端记录一次error, 当出错的次数达到max_connect_errors的时候,这个客户端就会被锁定。 所以根据业务来尽量把这个值设置大一点,mysql默认值为10,这里设置为1000. 并非越大越好,越大被攻击时安全性越低。 set global max_connect_errors=1000; 【方法二】 刷新记录报错host的文件 mysqladmin -uroot -p -h192.168.1.1 flush-hosts 或 mysql>flush hosts; ———————————————— https://blog.csdn.net/ningjiebing/article/details/102408136

 

标签:max,because,errors,many,connection,unblock,hosts,connect,flush
来源: https://www.cnblogs.com/chang09/p/16607292.html