Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1853635
Server version: 5.7.25 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> flush hosts;
Query OK, 0 rows affected (0.00 sec)
mysql> show global variables like '%max_connect_errors%';
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| max_connect_errors | 100 |
+--------------------+-------+
1 row in set (0.01 sec)
mysql> set global max_connect_errors=1000;
Query OK, 0 rows affected (0.00 sec)
mysql> show global variables like '%max_connect_errors%';
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| max_connect_errors | 1000 |
+--------------------+-------+
1 row in set (0.00 sec)
mysql>
复制代码
再次通过客户端连接成功
[clog@MC-FSB ~]$mysql -uroot -h192.168.10.18 -p
Enter password:
ERROR 1129 (HY000): Host '192.168.10.10' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'[clog@MC-FSB ~]$mysql -uroot -h192.168.10.18 -pEnter password: Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1853636Server version: 5.7.25 MySQL Community Server (GPL)Copyright (c) 2000, 2021, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>
If more than this many successive connection requests from a host are interrupted without a successful connection, the server blocks that host from further connections.