This article describes how to use Max_connect_errors for detailed explanation of MySQL performance parameters. if you need it, you can refer to max_connect_errors as a security-related counter value in MySQL, it is responsible for blocking clients that fail too many attempts to prevent brute force password cracking. The value of max_connect_errors does not have much to do with performance.
By default, this row may not exist in the my. cnf file. if you need to set this value, add it manually.
Parameter format
Max_connect_errors = 10
Modification method
If the system is CentOS or Debian, the configuration file may be in/etc/my. cnf. Open this file
[Root @ www ~] # Vi/etc/my. cnf
Then add the preceding statement to the [mysqld] configuration section.
Configuration instructions
When this value is set to 10, it means that if a client attempts to connect to the MySQL server but fails (such as a wrong password) for 10 times, MySQL will force the client to connect unconditionally.
If you want to reset the value of this counter, you must restart the MySQL server or execute
Mysql> flush hosts;
Command.
After the client successfully connects to the MySQL server once, the max_connect_errors of the client will be cleared.
Impact and error form
If the value of max_connect_errors is too small, the webpage may prompt that the database server cannot be connected. if you connect to the database through the SSH mysql command, the system will return
ERROR 1129 (00000): Host 'gateway' is blocked because of your connection errors; unblock with 'mysqladmin flush-hosts'
Error.
Functions and functions
Generally, it is recommended that the database server not listen to connections from the network, but only connect through sock to prevent most attacks against mysql. if you must enable the network connection of mysql, it is best to set this value, to prevent brute force password attacks.
Tips:
If your mysql database is frequently used for brute force password cracking, do not use it in general. when the number of settings is reached, the mysql service will be stopped.
The following is the 6000 setting for 16 GB memory machines. For more information, see.
Max_connect_errorrs = 6000
# Set the maximum number of abnormal interruptions of connection requests for each host. when this limit is exceeded, the MYSQL server will disable host connection requests, until the mysql server is restarted or the host information is cleared using the flush hosts command.