赞
踩
ERROR 1129 (HY000): Host '172.19.0.1' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
主机 172.19.0.1
被阻塞,因为它连接的连接数太多。如果想解除阻塞,执行命令mysqladmin flush-hosts
。
同一个ip在短时间内产生太多的数据库连接(超过mysql数据库max_connections
的最大值)而导致的阻塞;
mysqladmin flush-hosts
mysqladmin flush-hosts
mysqladmin -u root -p flush-hosts
mysqladmin -h 172.19.0.3 -u root -p flush-hosts
flush-hosts
可在mysql所在服务器登录mysql,但无法远程连接时,可按如下步骤进行操作。
登录mysql
mysql -uroot -p
随后输入数据库密码。
执行命令 flush-hosts
mysql> flush hosts;
再次远程登录
mysql> show variables like "max_connection%";
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+
1 row in set (0.00 sec)
设置max_connections 的数量
mysql> set global max_connections = 1500;
设置max_connection_errors的数量
mysql> set global max_connect_errors=1500;
SELECT substring_index(host, ':',1) AS host_name, state, count(*)
FROM information_schema.processlist
GROUP BY state, host_name;
select * from performance_schema.host_cache;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。