because of many connection errors; unblock with 'mysqladmin flush-hosts
环境: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的更多相关文章
- 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 ...
- 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 ...
- 黄聪: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 ...
- 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 ...
- 【错误】: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' 解决 ...
- 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 ...
- 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 ...
- 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' 一大 ...
- 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 ...
随机推荐
- 【转】SSL/TLS/WTLS协议原理
1 SSL(Secure Socket Layer)是netscape公司设计的主要用于web的安全传输协议.这种协议在WEB上获得了广泛的应用.2 IETF(www.ietf.org )将SSL作了 ...
- IDEA github的应用
1.下载并安装一个git 一直点下一步就可以 2.去github官网注册一个账号 https://github.com/ 2.1点击Sign up 进入注册页面 2.2填写注册信息,点击Create ...
- linux下OpenOffice与SwfTools环境安装
一.安装所需要的库与组件 yum install gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel 二.安装open ...
- DataTable的名称要后设置
string sqldatabase = string.Format(dr["sql"].ToString(), drpat["PATIENT_ID"].ToS ...
- PAT (Advanced Level) 1005. Spell It Right (20)
简单题. #include<iostream> #include<cstring> #include<cmath> #include<algorithm> ...
- 2016"百度之星" - 资格赛(Astar Round1) Problem B
规律题,斐波那契数列,数据有毒,0的时候输出换行.会爆longlong,写个大数模板或者Java搞. import java.io.BufferedInputStream; import java.m ...
- Java——类谜题
1.令人混淆的构造器 代码如下格式: public class Confusing { private Confusing(Object o) { System.out.println("O ...
- HDU 1068 Girls and Boys 二分图最大独立集(最大二分匹配)
Girls and Boys Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- C# 开发系列(三)
参考:http://stackoverflow.com/questions/11248935/passing-values-to-a-put-json-request-in-c-sharp 发送htt ...
- AnsiString用法(转)
源:AnsiString用法 //Ansistring 转 char void __fastcall TForm1::Button1Click(TObject *Sender) { AnsiStrin ...