Get the App
SLTechnology News&Howtos  ›  Database  › 

Example Analysis of MySQL performance parameters

Shulou Source: shulou.com Published: 2022-05-31 15:27:07 10月14日 Update

This article mainly introduces the example analysis of MySQL performance parameters, the article is very detailed, has a certain reference value, interested friends must read it!

Max_connect_errors is a security-related counter value in MySQL that is responsible for preventing too many failed clients from breaking passwords violently. The value of max_connect_errors does not have much to do with performance.

By default, this line may not be in the my.cnf file, and if you need to set this value, you can add it manually.

Parameter format

Max_connect_errors = 10

Modification method

If the system is CentOS, Debian, and so on, the configuration file may be located in / etc/my.cnf. Open this file

# vi / etc/my.cnf

Then add the above statement to the [mysqld] configuration section.

Configuration description

When this value is set to 10:00, this means that if a client attempts to connect to this MySQL server but fails 10 times (such as a password error, and so on), MySQL unconditionally forces the client connection to be blocked.

If you want to reset the value of this counter, you must restart the MySQL server or execute

Mysql > FLUSH HOSTS

Orders.

When this client successfully connects to the MySQL server once, the max_connect_errors for this client is cleared.

Influence and wrong form

If the setting of max_connect_errors is too small, the web page may prompt that the database server cannot be connected, while connecting to the database through the mysql command of SSH will return

ERROR 1129 (00000): Host 'gateway' is blocked because of many connection errors; unblock with' mysqladmin flush-hosts'

Mistake.

Function and function

Generally speaking, it is recommended that the database server not listen for connections from the network, but only through sock, so as to prevent the vast majority of attacks against mysql. If you have to open a network connection to mysql, it is best to set this value to prevent attacks that run out of passwords.

The above is all the contents of the article "sample Analysis of MySQL performance parameters". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Client server service client parameter performance password data database file error configuration performance parameter example analysis content command situation article network Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Apple Shulou Technology Xiaomi Shulou Information