我们都知道:
max_connections是指所有客户端同时在mysql实例上可以创建的连接总数。
而max_user_connections是指用户可以同时创建的连接总数。
那么为什么在 mysql.user 表中有一个名为 max_connections 的单独列用于所有用户?因为 max_connections 对所有用户都是相同的,并且是所有连接的全局变量?
最佳答案
MySQL permits limits for individual accounts on use of these server resources:
- The number of queries an account can issue per hour
- The number of updates an account can issue per hour
- The number of times an account can connect to the server per hour
- The number of simultaneous connections to the server by an account
... The server stores resource limits for an account in the user table row corresponding to the account. The
max_questions
,max_updates
, andmax_connections
columns store the per-hour limits, and themax_user_connections
column stores theMAX_USER_CONNECTIONS
limit.
关于mysql - mysql.user 表中的 max_connections 列有什么用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37560188/