当我运行时,show status like 'Con%'它显示的连接数为9972,并且一直在增长。这是活动的连接数还是总共建立的连接数?
Connections
与MySQL服务器的连接尝试次数(成功或失败)。
您可以通过状态变量查看活动连接的数量Threads_connected:
Threads_connected
当前打开的连接数。
mysql> show status where variable_name
= 'Threads_connected'; +-------------------+-------+ | Variable_name | Value | +-------------------+-------+ | Threads_connected | 4 | +-------------------+-------+ 1 row in set (0.00 sec) ...或通过show processlist命令:
mysql> show processlist; +----+------+-----------------+--------+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------+-----------------+--------+---------+------+-------+------------------+ | 3 | root | localhost | webapp | Query | 0 | NULL | show processlist | | 5 | root | localhost:61704 | webapp | Sleep | 208 | | NULL | | 6 | root | localhost:61705 | webapp | Sleep | 208 | | NULL | | 7 | root | localhost:61706 | webapp | Sleep | 208 | | NULL | +----+------+-----------------+--------+---------+------+-------+------------------+ 4 rows in set (0.00 sec)来源:stack overflow
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。