【mysql报错】MySQL host is blocked because of many connection errors; 解决方法
MySQL host is blocked because of many connection errors; 报错
环境
操作系统:Linux
数据库:mysql5.7.27
错误提示
jHost '10.146.5.209' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'Connection closed by foreign host.
原因
同一ip短时间之内产生太多(超过mysql数据库max_connection_errors的最大值)中断的数据库连接而导致的阻塞;
解决方法
第一种:提高允许的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';
第一种:提高允许的max_connect_errors数量
whereis mysqladmin查找mysqladmin的路径
使用命令修改:
/usr/bin/mysqladmin flush-hosts -h主机ip -uroot -p
备注:
如果是配置了主从备份的也需要都清理一遍
第二步也可以在数据库中进行,登录数据库,命令如下:
mysql> flush hosts;
【mysql报错】MySQL host is blocked because of many connection errors; 解决方法的更多相关文章
- 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 ...
- 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'
错误: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 ...
- MySql Host is blocked because of many connection errors;
错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因: 同一个i ...
- 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 ...
- 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' 解决方法
不要贪快,以你的聪明,只要有耐心,什么事不成,你真的争口气,羞羞这势利的世界也好! --久节奏,慢读书 转自:https://www.cnblogs.com/susuyu/archive/2013/0 ...
随机推荐
- 《细说PHP》第四版 样章 第18章 数据库抽象层PDO 9
18.7 PDO的事务处理 事务是确保数据库一致的机制,是一个或一系列的查询,作为一个单元的一组有序的数据库操作.如果组中的所有SQL语句都操作成功,则认为事务成功,那么事务被提交,其修改将作用于所 ...
- Seven Kinds of Testers - 七种类型的测试
最近读了James大叔的一篇总结Tester类型的文章,获益良多.原文叫做Seven Kinds of Testers(链接:http://www.satisfice.com/blog/archive ...
- WEB引入Google思源黑体
通过Link标签在网页头部引用Google Web Font: 1 <link rel="stylesheet" href="https://fonts.googl ...
- oracle trunc 日期 数字 的使用例子
/**************日期********************/1.select trunc(sysdate) from dual --2013-01-06 今天的日期为2013-01-0 ...
- fastjson对于yyyy-MM-dd HH:mm格式的反序列化问题
原创GrayHJX 发布于2017-03-14 22:56:33 阅读数 6851 收藏 展开 问题:最近在工作中遇到这么一个问题:有个实体类,它有个date类型的属性,当在这个属性加上fastjs ...
- SpringBoot源码解析系列文章汇总
相信我,你会收藏这篇文章的 本篇文章是这段时间撸出来的SpringBoot源码解析系列文章的汇总,当你使用SpringBoot不仅仅满足于基本使用时.或者出去面试被面试官虐了时.或者说想要深入了解一下 ...
- PHP mysqli_rollback MySQLi 函数
定义和用法 mysqli_rollback - 回退当前事务 语法: mysqli_rollback ( mysqli $link ) 参数 参数 必需的 描述 link 是 由mysqli_conn ...
- python中的随机数生成
结论先行 生成随机数: # salt = ''.join(random.choices(string.ascii_letters + string.digits, k=3)) salt = ''.jo ...
- [b0025] vmware_桥接网路设置
总结: 桥接 模式上外网比较简单. 缺点是每次重启虚拟机,分配的IP可能变化,导致 xshell 连接 时都要修改,很麻烦 桥接模式能不能配置静态IP ? 1. 环境 物理机网络 情况,从外部自动 ...
- Maven报错Please ensure you are using JDK 1.4 or above and not a JRE
在部署Jenkins项目时,用Jenkins调用服务器上脚本时,脚本在服务器上执行没有任何问题,但是在Jenkins上调用时就报错,提示mvn应该使用全路径执行,当加入jdk,jre,maven环境变 ...