Get the App
SLTechnology News&Howtos  ›  Database  › 

To check the number and status of connections in MySQL

Shulou Source: shulou.com Published: 2022-06-01 18:58:18 10月03日 Update

This article mainly introduces MySQL to view the number of connections and connection status steps, the contents of the article are carefully selected and edited by the author, with a certain pertinence, for everyone's reference significance is still relatively great, the following with the author to understand the MySQL to view the number of connections and connection status steps.

1. Mysql > show status like & 39th% connections & 39th connections, the number of connections attempted to connect to the MySQL CVM (whether successful or not). Max_used_connections

1. Mysql > show status like'% connect%'

Connections, the number of connections attempted to connect to the MySQL CVM (whether successful or not).

Max_used_connections, the maximum number of connections that have been used at the same time since the CVM was started.

Threads_connected, current number of connections.

2. Mysql > show variables like'% connect%'

Max_connections, maximum number of connections.

3. Modify max_connections

At the bottom of the configuration file (my.cnf or my.ini), add:

Max_connections=32000

Then, restart / etc/init.d/mysqld restart with the command

Although 32000 is written here, the maximum number of connections allowed on the actual MySQL CVM is 16384.

The maximum number of allowable connections has been added, which does not increase the system consumption greatly.

4. Mysql > show processlist

Displays the MySQL connection that is currently in progress.

After reading the above steps for MySQL to check the number and status of connections, many readers must have some understanding. If you need more industry knowledge and information, you can continue to follow our industry information column.

Tags: Maximum server service step status success author industry small information content at the same time commands actual meaning quantity files articles more friends Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Apple Xiaomi Linux Docker