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 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;
Mysql连接错误:Mysql Host is blocked because of many connection errors的更多相关文章
- MySql Host is blocked because of many connection errors;
错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因: 同一个i ...
- 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 ...
- 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 ...
- (转!)MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法
不要贪快,以你的聪明,只要有耐心,什么事不成,你真的争口气,羞羞这势利的世界也好! --久节奏,慢读书 转自:https://www.cnblogs.com/susuyu/archive/2013/0 ...
- 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'
错误: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报错】MySQL host is blocked because of many connection errors; 解决方法
MySQL host is blocked because of many connection errors; 报错 环境 操作系统:Linux 数据库:mysql5.7.27 错误提示 jHost ...
随机推荐
- IntelliJ IDEA 2018.3 for Mac 注册码激活
一.前往 jetbrains 官网下载 IDEA Ultimate版本,地址: https://www.jetbrains.com/idea/download/#section=mac 二.安装 ID ...
- FFmpeg数据结构AVFrame
本文为作者原创,转载请注明出处:https://www.cnblogs.com/leisure_chn/p/10404502.html 本文基于FFmpeg 4.1版本. 1. 数据结构定义 stru ...
- 【学习笔记】JS经典异步操作,从闭包到async/await
参考文献:王仕军——知乎专栏前端周刊 感谢作者的热心总结,本文在理解的基础上,根据自己能力水平作了一点小小的修改,在加深自己印象的同时也希望能和各位共同进步... 1. 异步与for循环 抛出一个问题 ...
- MySQL之库、表操作
一.库操作 创建库 create database 库名(charset utf8 对库的编码进行设置,不写就用默认值) 库名可以由字母.数字.下划线.特殊字符,要区分大小写,唯一性,不能使用关键字, ...
- [转]完整记录在 windows7 下使用 docker 的过程
本文转自:https://www.jianshu.com/p/d809971b1fc1 借助 docker 可以不在开发电脑中安装环境,比如 nodejs,记录下如何实现. 下载安装 根据自己的电脑系 ...
- [转]VS Code 扩展 Angular 6 Snippets - TypeScript, Html, Angular Material, ngRx, RxJS & Flex Layout
本文转自:https://marketplace.visualstudio.com/items?itemName=Mikael.Angular-BeastCode VSCode Angular Typ ...
- spring cloud config安全
前面两篇介绍了spring cloud config服务端和客户端的简单配置,本篇介绍如何保护config server及对应config client修改. 保护config server,主要是使 ...
- HTML暗黑料理之a标签执行请求不跳转页面
不是被逼无奈不建议用这HTML暗黑料理. <iframe id="></iframe> <a class="large green button&qu ...
- HDU6095
Rikka with Competition Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/O ...
- 【读书笔记】iOS-iPad与iPhone
在开发通用型应用的时候,你总是需要记住,iPad并不是一个大大的iPod touch,为iPad开发的应用的界面应该更好地利用iPad的大屏幕,而不应该是iPhone应用的复制品. 参考资料:< ...