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 name是注释掉的结果,应该跟缓存有关。

原因:MySQL服务器已经从某个host接收了大量中途终止的连接,于是决定终止继续接收来自该host的连接,允许最大的连接错误数为max_connect_errors,通过show variables命令可以查询,一般为10。

出现domain name而不是IP的原因是MySQL服务端在接收连接的时候会对客户端作DNS resolve,结果会被mysqld缓存,如果只用IP连接,可以在启动mysqld时加上-skip-name-resolve参数(命令行或my.cnf)。

解决方法:在另外一处地方执行mysqladmin flush-host或者登录进mysql执行flush hosts(本机host已经不允许登录!)。

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

时间: 2024-10-12 20:19:02

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

错误原因 同一IP在短时间内产生太多(超过mysql数据库max_connection_errors的最大值)error的数据库连接而导致的阻塞. 当客户端连接服务器超时(超过connect_timeout),服务端就会给这个客户端记录一次error,当出错的次数达到max_connect_errors的时候,这个客户端就会被锁定.所以可以根据业务来尽量把这个值设置大一点. 解决办法 1. 提高允许的max_connect_errors的数量 执行如下命令(临时生效,重启后失效) set glo

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’的在中途被中断了的连接请求