错误日志:

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. QDateTime QString

    QDateTime格式化  yyyy-MM-dd hh:mm:ss QString getFormatDateStr(QDateTime dateTimeParam) { qDebug() <& ...

  2. osg fbx遍历模型节点名称

    ; k<sg->getNumChildren(); k++) { //转换编 std::string name = vcfbx1.w2m1(vcfbx1.m2w1(sg->getCh ...

  3. zip格式压缩文件辅助类(ZipHelper)

    /// <summary> /// 压缩解压文件 /// </summary> public class ZipHelper { /// <summary> /// ...

  4. 123457123456#0#-----com.threeapp.HeiXIanBuNengPeng01----黑线不能碰

    -com.threeapp.HeiXIanBuNengPeng01----黑线不能碰

  5. 生成count位随机数工具类

    工具类 import java.util.Random; /** * 生成6位随机数字 */ public class GeneratorCode { /** * * @Title: getCode ...

  6. demo rabbitmq topic(主题模式),fanout(广播模式),轮询分发,确认接收Ack处理

    //durable = true 代表持久化 交换机和队列都要为true ,持久代表服务重启,没有处理的消息依然存在 //topic 根据不同的routkey 发送和接收信息 //fanout 广播模 ...

  7. 印象笔记·剪藏 Chrome插件

    印象笔记·剪藏 Chrome插件 链接:https://pan.baidu.com/s/10nzrSk_3sLkOI29MIEPEBw  密码:p8n8

  8. VBA方法总结

    1.取得日文汉字的读音的方法(例如強→キョウ) Application.Getphonetic(str) 2.保存Excel文件时不弹出是否保存的alter wb.close(false) 3.提示消 ...

  9. java模拟from表单提交,上传图片

    /** * java上传表单,有图片 * @param urlStr 上传地址 * @param textMap 表单参数 * @param fileMap 文件参数 key:文件名称 value:文 ...

  10. TypeScript symbol类型

    自ECMAScript 2015(ES6)起,symbol成为了一种新的原生类型,就像基本类型number和string一样. ⒈介绍及使用方式 TypeScript中使用symbol类型和JavaS ...