mysql.user table 中的 max_connections 列有什么用?
What's the use of max_connections column in mysql.user table?
我们都知道:
max_connections是指所有客户端可以同时在mysql实例上创建的连接总数。
而max_user_connections是指用户可以同时创建的连接总数。
那么为什么 mysql.user table 中的所有用户都有单独的名为 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
, and max_connections
columns store the per-hour limits, and the max_user_connections
column stores the MAX_USER_CONNECTIONS
limit.
我们都知道:
max_connections是指所有客户端可以同时在mysql实例上创建的连接总数。
而max_user_connections是指用户可以同时创建的连接总数。
那么为什么 mysql.user table 中的所有用户都有单独的名为 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.