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.
#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!