MySQL概念:会话与连接 [英] MySQL concepts: session vs connection
问题描述
我对MySQL概念感到困惑:会话与连接.
I'm a bit confused by MySQL concepts: session vs connection.
在谈论连接到MySQL时,我们使用连接术语,连接池等.
When talking about connecting to MySQL, we use connection terminology, connection pool, etc.
但是在MySQL在线文档中: http://dev.mysql.com/doc/refman/4.1/zh-CN/server-system-variables.html 讨论会话变量.
However in the MySQL online doc: http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html it talks about session variables.
它们非常相似.如何区分它们?
They are quite similar. How to distinguish them?
谢谢.
推荐答案
会话
只是成功的连接
的结果.任何MySQL客户端都需要一些连接设置来建立连接,并且在建立连接后,它会获取连接ID(线程ID)和一些称为会话的上下文.
A session
is just a result of a successful connection
. Any MySQL client requires some connection settings to establish a connection and after the connection has been established it acquires a connection id (thread id) and some context which is called session.
这篇关于MySQL概念:会话与连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!