环境:linux,mysql5.5.37

错误: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_connect_errors%';

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

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

2、使用mysqladmin flush-hosts 命令清理一下hosts文件(不知道mysqladmin在哪个目录下可以使用命令查找:whereis mysqladmin);

  ① 在查找到的目录下使用命令修改:/usr/bin/mysqladmin flush-hosts -h192.168.1.1 -P3308 -uroot -prootpwd;

  备注:

    其中端口号,用户名,密码都可以根据需要来添加和修改;

    配置有master/slave主从数据库的要把主库和从库都修改一遍的(我就吃了这个亏明明很容易的几条命令结果折腾了大半天);

    第二步也可以在数据库中进行,命令如下:flush hosts;

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

because of many connection errors; unblock with 'mysqladmin flush-hosts的更多相关文章

  1. mysql连接报错 Host ‘xxx’is blocked because of many connection errors;unblock with 'mysqladmin flush-hosts'

    程序无法连接MySQL,提示:  null, message from server: "Host '192.168.6.68' is blocked because of many con ...

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

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

  4. blocked because of many connection errors; unblock with 'mysqladmin flush-hosts;MySQL在远程访问时非常慢的解决方法;MySql链接慢的解决方法

     一:服务器异常:Host 'xx.xxx.xx.xxx' is blocked because of many connection errors; unblock with 'mysqladmin ...

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

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

  7. Could not create pool connection. The DBMS driver exception was: null, message from server: "Host '192.168.XX.XX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

    早上打开浏览器准备登陆某个系统,发现Error 404--Not Found,有点奇怪,这个服务器应该没人用了才对,然后到weblogic后台去看日志,报如下错误: "Could not c ...

  8. 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' 一大 ...

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

    解决方法如下:  方法 1.在线修改提高允许的max_connection_errors数量: A. 登录Mysql数据库查看max_connection_errors: mysql>show ...

随机推荐

  1. Jquery学习笔记:利用jquery获取select下拉框的值

    jquery不是特别熟练,每次使用不常用的就要百度,特地记录下来. 我的下拉框是: <div class="form-group"> <select class= ...

  2. SQL Server中数据库文件的存放方式,文件和文件组

    原文地址:http://www.cnblogs.com/CareySon/archive/2011/12/26/2301597.html   SQL Server中数据库文件的存放方式,文件和文件组 ...

  3. Substrings 子字符串-----搜索

    Description You are given a number of case-sensitive strings of alphabetic characters, find the larg ...

  4. 通过maven添加quartz

    pom.xml中相关dependency信息 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 <depen ...

  5. 为什么arcgis里,鼠标的图标都变成放大镜不能用了

    做作业做到一半,鼠标的图标就只有放大镜了,不管是点箭头还是作图工具都没用,手抓的也没用,只剩下放大镜的功能和图标了,这是怎么一回事啊?种情况我碰到过几次,具体原因不清楚,但是解决方法是有的:把你的数据 ...

  6. C#创建微信自定义菜单

    string posturl = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=" + access_to ...

  7. Let&#39;s Encrypt+Apache+Tomcat实现免费HTTPS

    Let's Encrypt是一个免费SSL证书发行项目,发行的证书已经获得主流浏览器的支持,亲测谷歌浏览器(桌面版).火狐浏览器(桌面版).UC浏览器(手机版).360浏览器(手机版)支持,其它的暂没 ...

  8. SICP 习题 (1.9) 解题总结

    SICP 习题 1.9 开始针对“迭代计算过程”和“递归计算过程”,有关迭代计算过程和递归计算过程的内容在书中的1.2.1节有详细讨论,要完成习题1.9,必须完全吃透1.2.1节的内容,不然的话,即使 ...

  9. 在 IIS 中配置 ASP.NET 应用程序

     注意事项: 1.注册.NET 如果先安装.net平台,后安装IIS,那么在IIS中可能就没有出现ASP.NET版本的下拉菜单,就要手动注册: 一般.Net版本都存放在:C:\WINDOWS\Micr ...

  10. Python爬虫入门教程 7-100 蜂鸟网图片爬取之二

    蜂鸟网图片--简介 今天玩点新鲜的,使用一个新库 aiohttp ,利用它提高咱爬虫的爬取速度. 安装模块常规套路 pip install aiohttp 运行之后等待,安装完毕,想要深造,那么官方文 ...