问题: Host "xxx" is blocked because of many connection errors,unblock with 'mysqladmin flush-hosts

错误原因

同一IP在短时间内产生太多(超过mysql数据库max_connection_errors的最大值)error的数据库连接而导致的阻塞。

当客户端连接服务器超时(超过connect_timeout),服务端就会给这个客户端记录一次error,当出错的次数达到max_connect_errors的时候,这个客户端就会被锁定。所以可以根据业务来尽量把这个值设置大一点。

解决办法

1. 提高允许的max_connect_errors的数量

  执行如下命令(临时生效,重启后失效)

  set global max_connect_errors=500;

  或者在mysql配置文件中新增以下配置(永久生效)

  max_connect_errors=500

2. 使用清除缓存的方法,这样就会把计数清理掉

  进入mysql控制台,执行flush hosts

  mysql>flush hosts;

  或者到mysql安装目录下,使用mysqladmin  -u  root  -p  flush-hosts命令,输入密码后,即完成清除缓存

参考地址

https://www.cnblogs.com/ruiy/p/11187084.html

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

问题: Host "xxx" is blocked because of many connection errors,unblock with 'mysqladmin flush-hosts

原文地址:https://www.cnblogs.com/kiko2014551511/p/11612970.html

时间: 2024-10-27 12:04:00

问题: Host "xxx" is blocked because of many connection errors,unblock with 'mysqladmin flush-hosts的相关文章

Host XXX is blocked because of many connection errors, unblock with 'mysqladmin flush-hosts

连接MySQL失败,除了权限问题之外,还遇到这种情况,出错信息:Host XXX is blocked because of many connection errors, unblock with 'mysqladmin flush-hosts'.而且XXX还不是IP地址而是domain name.MySQL服务器和客户端在同一台测试及其上,连接的时候用的mysql -u root -h ipaddr. 查看机器的hosts配置,确实有domain name映射到本机地址,但是有变化,旧的已经

Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因: 同一个ip在短时间内产生太多(超过mysql数据库max_connection_errors的最大值)中断的数据库连接而导致的阻塞: 解决方法: 1.提高允许的max_connection_errors数量(治标不治本): ① 进入Mysql数据库查看max_connection_errors: show

黄聪:MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法(转)

转自:http://www.cnblogs.com/susuyu/archive/2013/05/28/3104249.html 环境:linux,mysql5.5.21 错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因: 同一个ip在短时间内产生太多(超过mysql数据库max_connection_errors的最大值)中断的数据库连接而导致的阻塞: 解

MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法

环境:linux,mysql5.5.21 错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因: 同一个ip在短时间内产生太多(超过mysql数据库max_connection_errors的最大值)中断的数据库连接而导致的阻塞: 解决方法: 1.提高允许的max_connection_errors数量(治标不治本): ① 进入Mysql数据库查看max_con

【错误】:MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

错误:MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法: 使用mysqladmin flush-hosts 命令清理一下hosts文件(不知道mysqladmin在哪个目录下可以使用命令查找:whereis mysqladmin): 在查找到的目录下使用命令修改:/usr/bin/mysqladmin flush-hosts -h192.168.1

MairaDB中,MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法

airaDB中,MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法 环境:linux,10.0.38-MariaDB, 错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因:同一个ip在短时间内产生太多(超过mysq

mysql host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

同一个ip在短时间内产生太多(超过mysql数据库max_connection_errors的最大值,现在版本的默认值很小,可以适当修改大一点)中断的数据库连接而导致的阻塞: 解决方法: 1.提高允许的max_connection_errors数量(治标不治本): ① 进入Mysql数据库查看max_connection_errors: show variables like '%max_connection_errors%';   ② 修改max_connection_errors的数量为10

Host XXX is blocked because of many connection 问题

不知道为什么,我设置的Solr 数据import工具,每运行一段时间后,就无法连接数据库导入数据.经检查说是报错:ERROR 1129 (00000): Host 'XXXXXX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' . 对于这个问题,我目前查不出来究竟是solr的import数据工具有问题,还是什么原因.现在只能是在数据库服务器端,以root权限登录上去,然后执行

mysql Host ‘XXXXXX’ is blocked because of many connection errors

mysql Host ‘XXXXXX’ is blocked because of many connection errors ERROR 1129 (00000): Host ‘XXXXXX’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’查了下资料 这说明mysqld已经得到了大量(max_connect_errors)的主机’hostname’的在中途被中断了的连接请求