MySQL 显示状态 - 活动连接数还是总连接数?
当我运行 show status like 'Con%'
时,它显示连接数,为 9972 个,并且在不断增长。这是活跃连接数还是总连接数?
When I run show status like 'Con%'
it shows the number of connections, which is 9972 and constantly growing. Is this an active number of connections or connections made in total?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
你也可以做
You can also do
这是到目前为止与服务器的连接总数。
要查找当前的连接状态,您可以使用
这将向您显示:
This is the total number of connections to the server till now.
To find current conection status you can use
This will show you:
要查看更完整的列表,您可以运行:
或
参见 this链接以更好地了解用法。
如果您想了解有关数据库的详细信息,可以运行:
To see a more complete list you can run:
or
See this link to better understand the usage.
If you want to know details about the database you can run:
为了检查允许的最大连接数,您可以运行以下查询:
要检查自服务器启动以来同时使用的最大连接数:
要检查活动连接数,请使用:
或
Hope it有帮助。
In order to check the maximum allowed connections, you can run the following query:
To check the number of the maximum number of connections that have been in use simultaneously since the server started:
To check the number of active connections, use:
or
Hope it helps.
根据文档 http://dev.mysql。 com/doc/refman/5.0/en/server-status-variables.html#statvar_Connections
连接
尝试连接 MySQL 服务器的次数(成功或失败)。
As per doc http://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html#statvar_Connections
Connections
The number of connection attempts (successful or not) to the MySQL server.
它应该是当前的活动连接数。运行命令
processlist
进行确认。参考网址:http://www. devdaily.com/blog/post/mysql/how-show-open-database-connections-mysql
编辑:打开的数据库连接数请看这里,实际的线程(连接)数是描述在这里!
It should be the current number of active connections. Run the command
processlist
to make sure.URL for reference: http://www.devdaily.com/blog/post/mysql/how-show-open-database-connections-mysql
EDIT: Number of DB connections opened Please take a look here, the actual number of threads (connections) are described here!
根据 文档,这意味着历史上的总数:
您可以通过
Threads_connected
状态变量:...或通过
show processlist
命令:According to the docs, it means the total number throughout history:
You can see the number of active connections either through the
Threads_connected
status variable:... or through the
show processlist
command:这将向您显示所有打开的连接。
This will show you all the open connections.