Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to solve the "Host is blocked because of many connection errors" problem in mysql

Shulou Source: shulou.com Published: 2022-06-02 08:29:43 11月16日 Update

This article mainly explains how to solve the "Host is blocked because of many connection errors" problem in mysql. The explanation in the article is simple and clear, easy to learn and understand. Please follow the editor's train of thought to study and learn how to solve the "Host is blocked because of many connection errors" problem in mysql.

Reason

The service deployed on the host was rejected because the database account was misconfigured, which caused the number of failed connections to the MySQL service to exceed the max_connection_errors parameter setting value (default 10) in a short period of time.

Solution method

Method 1:

Refresh the file that records the error report host

Mysqladmin-uroot-p-h292.168.1.1 flush-hosts

Or

Mysql > flush hosts

Note: the database master and slave server needs to determine which MySQL service has been rejected, refresh the corresponding server, or refresh them all if you are not sure.

Method 2:

Enter the database to increase the max_connection_errors parameter, or you can modify it in the my.cnf file, but you need to restart MySQL.

Mysql > show variables like'% max_connection_errors%'

Mysql > set global max_connect_errors = 1000

Mysql > show variables like'% max_connection_errors%'

Thank you for your reading, the above is the content of "how to solve the" Host is blocked because of many connection errors "problem in mysql. After the study of this article, I believe you have a deeper understanding of how to solve the" Host is blocked because of many connection errors "problem in mysql, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Problems services data databases methods learning content parameters files servers master and slave reasons that is ideas situations articles time more times knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Technology Huawei Docker macOS