[Updated on: 2020/12/26] This error may occur as a result of something like several unsuccessful connection attempts. In these cases, the MySQL system prevents unauthorized access for security reasons such as cyber attacks. But sometimes these unwanted things can happen and this problem needs to be solve. You may also need to delete the host records from MySQL. In this article, we try to learn you how to Fix mysqladmin flush-hosts Error in Linux. You can also visit the packages available in Eldernode to purchase a Linux VPS server.
Tutorial Fix mysqladmin flush-hosts Error in Linux
By default, max_connect_errors is set to 100. This means that MySQL stops a user and a host after 100 failed connection errors, and the security system is activated, preventing additional communication from that host. You can change this value by setting max_connect_errors. You must first make sure that no TCP/IP connection from this host is faulty, and if there is a network problem, it is recommending that you increase the max_connect_errors value.
If you encounter the following error, you should follow the step mentioned in this article to be able to fix this error.
Host 'hostname' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
In the continuation of this article, join us in learning how to Fix mysqladmin flush-hosts Error in Linux.
Fix mysqladmin flush-hosts Error in Linux
To fix this, you need to check the value set for “max_connect_errors” in the “my.cnf” file. For this purpose, follow the steps below:
Enter the “my.cnf” file with the following command:
Then set “max_connect_errors” as follows:
If “max_connect_errors” does not exist in the “my.cnf” file, Add the following lines to the beginning of the file and save them:
In this article, we tried to help you fix mysqladmin flush-hosts Error in Linux by checking and making changes to max_connect_errors. If another error occurs, such as an internal server error, you can refer to the article How to fix Internal Server Error 500 to learn it.