侧边栏壁纸
博主头像
陈大雷的 Blog博主等级

行动起来,活在当下

  • 累计撰写 98 篇文章
  • 累计创建 24 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

mysql is blocked because of many connection errors

Administrator
2017-10-24 / 0 评论 / 0 点赞 / 19 阅读 / 1850 字

mysql is blocked because of many connection errors

错误信息:

Host 'xxx.xxx.xxx.xxx' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'Connection closed by foreign host

原因:是同一IP的connection errors超出默认的最大值了。

方法一:通过命令行进行mysql控制台
输入 flush hosts

方法二:修改max_connect_errors连接数

mysql> set global max_connect_errors = 500;
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like '%max_connect_errors%';
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| max_connect_errors | 500   |
+--------------------+-------+
1 row in set (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)


最后重启mysql服务 service mysql restart

0

评论区