“Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
→‎R
第21行: 第21行:
 
=see also=
 
=see also=
 
https://blog.csdn.net/li_li_lin/article/details/72764683
 
https://blog.csdn.net/li_li_lin/article/details/72764683
 +
 +
https://www.cnblogs.com/susuyu/archive/2013/05/28/3104249.html
 +
 +
https://www.cyberciti.biz/faq/error-1129-hy000-host-is-blocked-because-of-many-connection-errors/

2020年3月18日 (三) 03:04的版本

一次 aws rds mysql故障处理过程

Q

Host is ’U vm ip‘ blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

R

如上可见  这个 IP被mysql server  blocked 

处理过程   计数清理掉
 一开始 连接到 mysql server  mysqladmin  -h database-.com -uroot  -P3306 -p flush-hosts
 看进来是正常的  不过在那台VM 还是连接不上 mysql 
 
 中间各种 google  还是没成功  ,又想到  max_connect_errors   show global variables like '%max_connect_errors%';  
   set global max_connect_errors = 1000;  是不成功的提示不是 超级用户 哈哈 这个比较坑 ,只好
 打开 rds  web 改配置 一开始搞到 500  还是不行  中间各种搞  各种 mysql>kill   在最后 改为2W 好了 哈哈 

tips

当客户端连接服务端超时(超过connect_timeout), 服务端就会给这个客户端记录一次error,当出错的次数达到max_connect_errors的时候,这个客户端就会被锁定。所以根据业务来尽量把这个值设置大一点,mysql默认值为10,我们可以根据具体需要设置大一点,这里设置为1000.(并非越大越好,越大被攻击时安全性越低)

see also

https://blog.csdn.net/li_li_lin/article/details/72764683

https://www.cnblogs.com/susuyu/archive/2013/05/28/3104249.html

https://www.cyberciti.biz/faq/error-1129-hy000-host-is-blocked-because-of-many-connection-errors/