MYSQL connection parameters and Status values
This article introduces and compares the connection parameters and Status values of mysql.
I. MYSQL connection parameter variables
1. Frequently Used connection limit parameters
Show variables like '% connect % ';
| Max_connect_errors | 999999999 | # maximum number of connection errors allowed for a single user. If the maximum number of connection errors is exceeded, disable the user's new connection | max_connections | 6000 | # maximum number of instance Connections | max_user_connections | 0 |## maximum number of user connections. The default value 0 indicates no limit, the total number of connections observed is less than or equal to max_connections | connect_timeout | 10 |## user connection timeout limit. If the connection still cannot be connected to mysql, the connection is terminated.
2. Connection timeout parameters
3,
Ii. MySQL connection status variables
1. Common link status variables
Show global status like '% connect % ';
+ Connections + ---------- + | Connection_errors_max_connections | 1906160 | # maximum number of wrong Connections of the user | Connections | 87341259 | # historical user connection cumulative value | Max_used_connections | 10242 | # maximum number of Connections in history, number of connections seen by processlist | Threads_connected | 298 | # Number of current user connections, current number of processlist
Show global status like '% Threads_running % ';
| Threads_running | 2 | # number of currently running user connections, not sleep
Show global status like '% abort % ';
+ ------------------ + ---------- + | Aborted_clients | 85050948 | # statistics on the status of the illegally terminated client connection, for example, kill the connection | Aborted_connects | 1905528 | # statistics on the status of illegal connection operations, for example, the user password is incorrect.
Iii. Analysis of Common Problems
1. the maximum number of connections exceeds the limit.
2. The number of user connection errors exceeds the limit.
3. The value of abort is very high.
4. Increasing connections
5,