`

MySql Host is blocked because of many connection errors; unblock with 'mysqladmi

阅读更多

错误: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;

 

转子:http://www.cnblogs.com/susuyu/archive/2013/05/28/3104249.html

 

这个原因是由于同事把mongodb的端口写成了mysql的3306,这样,每次mongodb请求的时候就会造成大量的错误,导致mysql不在接受本host的链接。

分享到:
评论

相关推荐

    Your page is blocked due to a security的解决方案

    关于Your page is blocked due to a security的解决方案

    java.sql.SQLException: null,  message from server: “Host ‘%’ is not allowed to connect to

    java.sql.SQLException: null, message from server: “Host ‘223.72.41.7’ is not allowed to connect to this MySQL server” 客户端访问时报错: 解决方法: 1,登陆服务器 mysql> use mysql; //用mysql ...

    微软内部资料-SQL性能优化3

    Another type of table lock is a schema stability lock (Sch-S) and is compatible with all table locks except the schema modification lock (Sch-M). The schema modification lock (Sch-M) is incompatible ...

    MYSQL

    18.2.3 Host '...' is blocked错误 18.2.4 Out of memory错误 18.2.5 Packet too large错误 18.2.6 The table is full错误 18.2.7 Commands out of sync in client错误 18.2.8 Ignoring ...

    MySQL中文参考手册.chm

    MySQL中文参考手册.chm 449kb <br/>0 译者序 1 MySQL的一般的信息 1.1 什么是MySQL? 1.2 关于本手册 1.2.1 本手册中使用的约定 1.3 MySQL的历史 1.4 MySQL的主要特征 1.5...

    MySQL中文参考手册

    * 1 MySQL的一般的信息 o 1.1 什么是MySQL? o 1.2 关于本手册 + 1.2.1 本手册中使用的约定 o 1.3 MySQL的历史 o 1.4 MySQL的主要特征 o 1.5 MySQL稳定性? o 1.6 顺应2000年 o 1.7 SQL一般信息和教程 o ...

    一个小游戏

    Gameloft的笔试 Rules of Game: ---------... If one sphere is blocked because there is something underneath, the other one will continue falling (with no player control over it) until it reaches something.

    Node.js-当CPU旋转和退出程序的堆栈跟时找出node进程是否受阻

    Figure out if your node process is blocked because the CPU is spinning and exit the program with a stack trace if that is the case

    Sakemail

    Because some people need to use IP addresses instead of Host names, I‘ve added a new property IPAddress to SakPOP and SakSMTP. If both are filled, then the Host name will be used, thanks to Roger F. ...

    python_hopelight_calendar_api

    若注册时提示Error:This user account is blocked.Contact support@vercel.com for more information. 这是由于Vercel不支持大部分国内邮箱。可以将github账号主邮箱改为Gmail邮箱。 但是根据群友React,将github...

    SQL Window SQLyog.rar

    HTTP and SSH Tunneling - smartly manage your MySQL server even if the MySQL port is blocked or remote access to MySQL is disallowed! very fast retrieval of data ODBC Migration Toolkit with option to...

    VclZip pro v3.10.1

    - By defining ZLIB121, VCLZip will use the latest version of ZLib which is included with the registered version. Some optimization improvements which should show some improvement in zipping and ...

    图像特征提取方法的研究.caj

    On the other hand, in real application efficiency is also an important indicator to assess one algorithm, because in many cases only algorithms with high efficiency can satisfy request of real task....

    python_github_calendar_api

    若注册时提示Error:This user account is blocked.Contact support@vercel.com for more information. 这是由于Vercel不支持大部分国内邮箱。可以将github账号主邮箱改为Gmail邮箱。 但是根据群友React,将github...

    word自动转化为chm

    However, what bothers you most is not using how many kinds of tools, the Word file, the CHM file and the online documents are all need to be modified, this is the real matter. Once the changing work ...

    The Cache Performance and Optimizations of Blocked Algorithms - 1991 (lam-asplos91)-计算机科学

    WolfComputer Systems LaboratoryStanford University, CA 94305AbstractBlocking is a well-known optimization technique for improvingthe effectiveness of memory hierarchies. Instead of operating onentire...

    BURNINTEST--硬件检测工具

    Here is a summary of all changes that have been made in each version of BurnInTest. Release 5.3 build 1035 revision 4 WIN32 release 10 November 2008 - Lenovo China specific build. Lenovo system ...

    iframe跨域问题

    iframe跨域问题:Uncaught DOMException Blocked a frame with origin解决方法

    tc_skbedit.rar_Blocked_tc skbedit

    The blocked_hash is used to find POSIX lock loops for deadlock detection. It is protected by blocked_lock_lock.

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    - ADD: In TFlexPanel.DefaultLinkPoint property added Size field that lets define visual size of the connection points of the flex-connectors. Initialized with DefaultLinkPointSize constant in the ...

Global site tag (gtag.js) - Google Analytics