MySql Host is blocked
来源:互联网 发布:eop模拟钢琴软件 编辑:程序博客网 时间:2024/05/20 23:32
环境: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_connection_errors: show variables like '%max_connection_errors%';
② 修改max_connection_errors的数量为1000: set global max_connect_errors = 1000;
③ 查看是否修改成功:show variables like '%max_connection_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;
- MySql Host is blocked
- MYSQL:Host 'XXXXXX' is blocked because of many connection errors
- MySql Host is blocked because of many connection errors; unblock
- MySql Host is blocked because of many connection errors;
- mysql “Host is blocked because of many connection errors”
- mysql 1129 错误Host is blocked because of many connection errors; unblock with 'mysqladmin flush-host
- Mysql连接错误:Mysql Host is blocked because of many connection errors
- MySQL无法连接[MySql Host is blocked because of many connection errors]
- Mysql连接错误:Mysql Host is blocked because of many connection errors
- 本周技术关注[面向webapps运维]: Mysql Host '...' is blocked 错误 - Metro的
- 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' 解决方法
- 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' 解决方法
- 数据库-mysql--Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
- mysql errors:message from server: "Host 'xxx' is blocked because of many connection errors; unblock
- 买二手房如何跳过中介公司攻略,节约中介费~
- 复数类(二)
- sprintf测试实验
- 单实例支撑每天上亿个请求的SSDB
- UnityVS
- MySql Host is blocked
- 存储班长信息的学生类
- UniCode 下 CString 转 char* 的方法
- three.js入门篇(一)
- android log
- Android Bitmap图像优化(中)
- iOS5中 UIViewController新方法的使用
- 用挂操作的方式写右键选择事件
- 关于oracle sql 中as与双引号的一点有趣故事