Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

To check the number and status of connections in MySQL

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report