Home > Database > Mysql Tutorial > body text

How to check the current number of connections in mysql

王林
Release: 2020-10-14 15:54:48
Original
3291 people have browsed it

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)
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!