环境: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;
本文来源于:http://www.cnblogs.com/susuyu/archive/2013/05/28/3104249.html
自己操作步骤:
1.远程连接数据库所在主机 ssh root@192.168.7.188
2.输入密码 qw365qb666
3.进入目录 cd /usr/bin
4.连接数据库 mysql -uroot -p111111
5.执行命令 flush hosts;
或者/usr/bin/mysqladmin flush-hosts -h192.168.7.188 -P3306 -uroot -p111111
相关推荐
关于Your page is blocked due to a security的解决方案
如果MySQL出现“Host 'IP' is blocked because of many connection errors”的错误提示,表明由于过多的连接错误,该IP地址已被MySQL服务器封锁。此时,可以通过执行`mysqladmin flush-hosts -h IP -u root -p`命令...
5. **ERROR 1129 (00000): Host ‘XXXXXX’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’** MySQL服务器将主机封锁,因为存在多次连接错误。使用`mysqladmin flush-...
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 ...
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 ...
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 449kb <br/>0 译者序 1 MySQL的一般的信息 1.1 什么是MySQL? 1.2 关于本手册 1.2.1 本手册中使用的约定 1.3 MySQL的历史 1.4 MySQL的主要特征 1.5...
* 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.
使用 HOSTS 选项可以清空主机名缓存,这个选项通常用于清空主机名缓存以便解决 Host 'host_name' is blocked 错误。 3. LOGS:关闭并重新加载二进制日志文件。 使用 LOGS 选项可以关闭并重新加载二进制日志文件,...
iframe跨域问题:Uncaught DOMException Blocked a frame with origin解决方法
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
4. **Host '...' is blocked**: 如果出现此错误,表示主机因多次连接错误被封锁。这可能是由于黑客攻击或其他连接问题。解锁方法是运行`mysqladmin flush-hosts`。可以通过调整`max_connect_errors`变量来设置封锁...
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. ...
若注册时提示Error:This user account is blocked.Contact support@vercel.com for more information. 这是由于Vercel不支持大部分国内邮箱。可以将github账号主邮箱改为Gmail邮箱。 但是根据群友React,将github...
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...
- 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 ...
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....
若注册时提示Error:This user account is blocked.Contact support@vercel.com for more information. 这是由于Vercel不支持大部分国内邮箱。可以将github账号主邮箱改为Gmail邮箱。 但是根据群友React,将github...
MySQL Proxy 是一个开源工具,由MySQL AB公司开发,允许用户在MySQL服务器和客户端应用程序之间插入一个代理层。这个代理层可以用来监控、过滤、修改或者路由数据库连接的流量,为数据库管理和性能优化提供了极大的...