错误日志:

message from server: "Host '10.250.112.141' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"

原因:

  同一个ip在短时间内产生太多(超过mysql数据库max_connection_errors的最大值)中断的数据库连接而导致的阻塞;

解决方法:

1、提高允许的max_connect_errors数量(这种方法不彻底,后期还可能导致异常出现):

  进入Mysql数据库查看max_connect_errors: show variables like 'max_connect_errors';

修改max_connect_errors的数量为1000: set global max_connect_errors = 1000;

查看是否修改成功:show variables like 'max_connect_errors';

2、使用mysqladmin flush-hosts 命令清理一下hosts文件

(1)如果是安装在Linux主机上的,可以通过whereis mysqladmin查找mysqladmin的路径

  使用命令修改:

/usr/bin/mysqladmin flush-hosts -h 10.250.112.141 -uroot -p

  备注:

   配置有master/slave主从数据库的要把主库和从库都修改一遍

 (2)如果是在数据库连接软件上也可以在命令列工具里修改,命令如下:flush hosts;
        mysql> flush hosts;

重新启动程序,查看数据库连接是否正常就好啦。

MySql Host is blocked because of many connection errors 问题的解决方法的更多相关文章

  1. 【错误】: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' 解决 ...

  2. 【mysql报错】MySQL host is blocked because of many connection errors; 解决方法

    MySQL host is blocked because of many connection errors; 报错 环境 操作系统:Linux 数据库:mysql5.7.27 错误提示 jHost ...

  3. 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 ...

  4. 黄聪: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 blo ...

  5. MySql 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' 原因: 同一个i ...

  6. MySql Host is blocked because of many connection errors;

    错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因: 同一个i ...

  7. Mysql连接错误:Mysql Host is blocked because of many connection errors

    环境:linux,mysql5.5.31错误:Host is blocked because of many connection errors; unblock with 'mysqladmin f ...

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

    不要贪快,以你的聪明,只要有耐心,什么事不成,你真的争口气,羞羞这势利的世界也好! --久节奏,慢读书 转自:https://www.cnblogs.com/susuyu/archive/2013/0 ...

  9. MySQL Host is blocked because of many connection errors 解决方法

    应用日志提示错误:create connection error, url: jdbc:mysql://10.45.236.235:3306/db_wang?useUnicode=true&c ...

随机推荐

  1. 一百四十:CMS系统之使用flask-paginate实现分页功能

    官方文档:https://pythonhosted.org/Flask-paginate/ 安装:pip install flask-paginate 在没有分页的情况下,默认会加载所有内容 在con ...

  2. 123457123457#0#-----com.cym.shuXueWangGuo1--前拼后广--儿童数学

    123456123456#1#-----com.cym.shuXueWangGuo1--前拼后广--儿童数学

  3. videojs改变音量大小

    <audio id=example-video preload="auto" class="video-js vjs-default-skin" type ...

  4. Permission denied: user=dr.who, access=READ_EXECUTE, inode="/tmp":student:supergroup:drwx------权限问题

    在查看browse directory时,点击tmp,无法进入,报错:“Permission denied: user=dr.who, access=READ_EXECUTE, inode=" ...

  5. Node.js使用child_process调用系统命令示例

    首先我们在D盘根目录下新建一个test.bat文件,他的内容如下: echo %date%%time% >> D:/test.txt 他的目的很简单,每次调用这个bat文件,都会在D:/t ...

  6. LODOP在页面让客户选择打印机

    获取打印机列表可以放在onload事件里,如过当前是使用的c-lodop,由于websoket链接需要时间,一进入页面可能会报错,被准备好或网页没下载完成等,也可以在点击事件里让用户获取打印机.之前写 ...

  7. 【C/C++开发】运算符重载

    c++的一大特性就是重载(overload),通过重载可以把功能相似的几个函数合为一个,使得程序更加简洁.高效.在c++中不止函数可以重载,运算符也可以重载.由于一般数据类型间的运算符没有重载的必要, ...

  8. word模板文档填充数据

    1.切记一定要用Word 97-2003(*.doc)格式的文档另存为 *.xml格式的文件,而不能用 Word 2007(*.docx)格式的word文档转 *.xml,将转成功之后的xml文件放入 ...

  9. eNSP下利用三层交换机实现VLAN间路由

    我们可以通过配置VLANif接口的方式来使交换机实现路由交换. 而VLANif接口是基于网络层的接口,可以配置ip地址 拓扑图如下

  10. 【基本优化实践】【1.6】在sql server修改且移动数据库文件位置

    在master数据库中,SQL Server提供系统扩展的存储过程,其中有一些存储过程的命名以xp_开头,用于处理操作系统的文件. 一,判断文件是否存在 存储过程sys.xp_fileexist 用于 ...