try to understand mysql concepts: session v.s. connection

牧云@^-^@ 提交于 2019-12-03 08:35:56

问题


I'm a bit confused by mysql concepts: session vs connection.

When we are talking about connecting to mysql. We use connection terminology, as well as connection pool and etc.

However let's go to 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?

Thanks in advance.


回答1:


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.



来源:https://stackoverflow.com/questions/8797724/try-to-understand-mysql-concepts-session-v-s-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!