Home>Article>Database> How to check the current number of connections in mysql

How to check the current number of connections in mysql

王林
王林 Original
2020-10-14 15:54:48 3280browse

Mysql method to check the current number of connections: You can check the current number of connections by executing the [show status like 'Threads%'] statement.

How to check the current number of connections in mysql

#In MySQL, after the connection is established, a thread will be assigned to take charge. A connection is a thread.

(Recommended tutorial:mysql video tutorial)

You can check the current number of connections by viewing the MySQL status parameters:

mysql> show status like 'Threads%'; +-------------------+-------+ | Variable_name | Value | +-------------------+-------+ | Threads_cached | 9 | | Threads_connected | 1 | | Threads_created | 3911 | | Threads_running | 1 | +-------------------+-------+ 4 rows in set (0.00 sec)

Among them, Threads_connected is Current number of connections.

Related recommendations:mysql tutorial

The above is the detailed content of How to check the current number of connections in mysql. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn