文档章节

host blocked because of many connection errors

威哥
 威哥
发布于 2015/11/20 14:07
字数 525
阅读 81
收藏 0
点赞 0
评论 0

unblock with 'mysqladmin flush-hosts'
思路 

  1. 查看连接数

    Max_used_connections / max_connections * 100% ≈ 85%

    一般的服务 最大设置1000 以下就差不多了

  2. 查看最大错误连接设置

  3. 是否是锁表

  • 是否并发访问

    最后 去查看相关资料 也是这样操作的,详细请查看



  • If you get a MySQL error like:

  • Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

  • This most likely means your PHP / Java whatever programming language application connecting to MySQL is failing to authenticate with the application created (existing) or that the application is trying too many connections to MySQL in a rate where MySQL server can't serve all the requests.

  • Some common errors for Too many Connection errors are:
     

  • Networking Problem

  • Server itself could be down

  • Authentication Problems

  • Maximum Connection Errors allowed.

  • The value of the max_connection_errors system variable determines how many successive interrupted connection requests are permitted to myqsl server.
     

  • Well anyways if you get the:

  • Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

  • You can consider this a sure sign application connections to MySQLis logging a lot of error connections, for some reason.
    This error could also appear on very busy websites where high amount of separete connections are used – I've seen the error occur on PHP websites whether mysql_pconnect(); is selected in favour of the prooved working mysql_connect();

  • The first thing to do before changing / increasing default set of max connection errors is to check how many max connection errors are set within MySQL?

  • For that connect with MySQL CLI and issue:
     

  • mysql> SHOW VARIABLES LIKE '%error%';


  • +——————–+————————————————————-+
    | Variable_name      | Value                                                           |
    +——————–+————————————————————-+
    | error_count        | 0                                                                     |
    | log_error          | /var/log/mysql//mysqld.log                                |
    | max_connect_errors | 10000                                                      |
    | max_error_count    | 64                                                               |
    | slave_skip_errors  | OFF                                                             |
    +——————–+————————————————————-+


  • A very useful mysql cli command in debugging max connection errors reached problem is

  • mysql> SHOW PROCESSLIST;

  •  

  • To solve the error, try to tune in /etc/my.cnf, /etc/mysql/my.cnf or wherever my.cnf is located:

  • [mysqld]
    max_connect_errors
    variable

  • and

  • wait_timeout var. Some reasonable variable size would be:

  • max_connect_errors = 100000
    wait_timeout = 60

  • If such (anyways) high values is still not high enough you can raise mysql config connection timeout

  •  

  • to

  • max_connect_errors = 100000000

  • Also if you want to try raise max_connect_errors var without making it permanenty (i.e. remember var setting after MySQL service restart), set it from MySQL cli with:

  • SET GLOBAL max_connect_errors


  • If you want to keep the set default max_connection_errors and fix it temporary, you can try to follow the error

  • Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

  • suggestion and issue in root console:

  • mysqladmin flush-hosts

  • Same could also be done from MySQL Cli with cmd:
     

  • FLUSH HOSTS;

  • - See more at: http://pc-freak.net/blog/host-blocked-connection-errors-unblock-mysqladmin-flushhosts/#sthash.5Gx5ukgE.dpuf


原文地址 http://pc-freak.net/blog/host-blocked-connection-errors-unblock-mysqladmin-flushhosts/

© 著作权归作者所有

共有 人打赏支持
威哥
粉丝 18
博文 21
码字总数 14506
作品 0
大兴
程序员
mysql 无法连接问题many connection

MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法 环境:linux,mysql5.5.21 错误:Host is blocked because of many connectio......

younchen
2014/01/14
0
1
MySql Host is blocked because of many connection e

环境:linux,mysql5.5.21 错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因:   同一个ip在短时间内产生太多(超过mysql数据库max...

庸夫俗子
2014/12/31
0
0
Mysql-connecion failed blocked because of many connection errors

今天调用api接口时出现错误ERHOSTIS_BLOCKED: Host '192.168.1.223' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'查询错误发现是由于 同一个ip在短......

johnL
2016/12/17
11
0
MySQL客户端连接时 MySql Host is blocked because of many.

错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因:   同一个ip在短时间内产生太多(超过mysql数据库maxconnectionerrors的最大值)...

岸芷汀兰
2016/03/03
35
0
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' 原因:   同一个ip在短时间内产生太多(超过mysql数据库maxconnectionerrors的最大值)...

技术小胖子
2017/11/15
0
0
mysql的Host is blocked 解决方案

Host 'XXX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 使用mysql的时候遇到这种情况的处理方案 使用命令行root登录后 mysql -u root -p 输入密......

点先森
02/07
0
0
mysql 连接出错 'mysqladmin flush-hosts'

mysql 连接出错 'mysqladmin flush-hosts' 环境说明: 内网测试服务器192.168.18.251 为WEB服务器,安装了mysql; 内网音视频转码服务器192.168.18.253安装了转码工具,其上/www/attachment挂...

ShuaiDing
2014/09/12
0
0
mysql 连接出错 'mysqladmin flush-hosts'

Tomcat 报出如下错误: java.sql.SQLException: null, message server: "Host ""*"" is blocked because of many connection errors; unblock with ""mysqladmin flush-hosts""" 解决办法: m......

五大三粗
2014/12/10
0
0
mysql flush-hosts

错误信息: message from server: "Host 'ip' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'" 1、使用mysqladmin flush-hosts命令清除缓存,命令执......

xuanxiangyu
2017/02/17
0
0
使用NAS123做端口映射外网访问MSQL可能出现的问题

1.映射端口,详见我之前转载的NAT123官网的文章。 2.等待端口起来以后用数据库登陆软件Toad for Mysql 登陆 举例: 192.168.1.119 数据库端口3306 映射的端口为:nat.nat123.net:3315 那么我...

NEWSANP
2014/04/25
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

打印斐波那契数

package com.jerry.ch04;public class PrintFibonacci {public static void main(String[] args) {for (int i=0; i<10; i++) {System.out.print(fib(i) + " ");}......

JerryNing
14分钟前
0
0
shell编程

一、shell脚本介绍

人在艹木中
14分钟前
0
0
istio 0.8 遥测 案例

==============遥测===================================== 演示如何从网格中收集遥测信息。 分布式跟踪。如何配置代理以向Zipkin或Jaeger发送跟踪请求 收集度量标准和日志。此任务说明如何配...

xiaomin0322
16分钟前
0
0
ND4J求多元线性回归以及GPU和CPU计算性能对比

上一篇博客《梯度下降法求多元线性回归及Java实现》简单了介绍了梯度下降法,并用Java实现了一个梯度下降法求回归的例子。本篇博客,尝试用dl4j的张量运算库nd4j来实现梯度下降法求多元线性回...

冷血狂魔
17分钟前
0
0
springboot常用注解

@SpringBootApplication: 包含@Configuration、@EnableAutoConfiguration、@ComponentScan 通常用在主类上。 @Service: 用于标注业务层组件。 @RestController: 用于标注控制层组件(如strut...

GoldenVein
23分钟前
1
0
如何进行大数据的入门级学习?

不知道你是计算机专业应届生还是已经从业者。总之,有java基础的学生学习大数据会轻松很多,零基础的小白都需要从java和linux学起。 如果你是一个学习能力特别强,而且自律性也很强的人的话可...

董黎明
37分钟前
0
0
使用Parcelable传递复杂参数

最近做AIDL传递对象,对象必须实现Parcelable的方法才可以被传递。 @Override    public int describeContents() {//这个 默认返回0就行了。        return 0;    }    ...

火云
38分钟前
0
0
十大Intellij IDEA快捷键

Intellij IDEA中有很多快捷键让人爱不释手,stackoverflow上也有一些有趣的讨论。每个人都有自己的最爱,想排出个理想的榜单还真是困难。以前也整理过Intellij的快捷键,这次就按照我日常开发...

HJCui
48分钟前
0
0
word 使用mathtype 编写 数学公式

下载安装,这个链接命名。。。。 http://www.mathtype.cn/xiazai.html 安装之后会多出一个选项 使用内联方式插入图表 编写公式的界面 设置支持latex 语法 输入公式回车就可以看到结果...

阿豪boy
今天
0
0
Promise

定义 Promise是异步编程的一种解决方案,所谓Promise就是一个容器,里面保存着某个未来才会结束的事件(通常是一个一步操作)的结果。 特点: 2.1 对象的状态不受外界影响,三种状态pending...

litCabbage
今天
1
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部