MySQL max_user_connections与max_connections [英] MySQL max_user_connections vs max_connections

查看:97
本文介绍了MySQL max_user_connections与max_connections的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很遗憾,即使在MySQL文档中,我也无法在任何地方找到对此查询的任何直接解释.

SADLY i could not find any straight-forward explanation to this query anywhere, not even in MySQL documentations.

各个论坛中的某些人说max_user_connections永远不能大于max_connections吗?例如:如果一个用户具有3 max_user_connections,另一用户具有15 max_user_connections,则他们说max_connections必须至少大于3+15 = 18.

Some people in various forums said max_user_connections can never be greater than max_connections? For example: if one user has 3 max_user_connections and another user has 15 max_user_connections, then they say the max_connections must be at least above 3+15 = 18.

但是,mysql文档说,最大允许值为

However, mysql doc says, max allowed value of max_user_connections is 4294967295 which is MUCH LARGER THAN the max allowed value of max_connections is 100000.

有人可以解释一下MySQL中的这两个选项如何相互影响.

Can somebody please explain how do these two options in MySQL impact one another.

推荐答案

限制客户端使用MySQL服务器资源的一种方法是 将全局max_user_connections系统变量设置为非零 价值.这限制了可以同时连接的数量. 由任何给定的帐户进行,但对客户可以进行的交易没有任何限制 做一次连接.此外,设置max_user_connections不会 启用个人帐户的管理.两种控制方式都属于 MySQL管理员对此很感兴趣.

One means of restricting client use of MySQL server resources is to set the global max_user_connections system variable to a nonzero value. This limits the number of simultaneous connections that can be made by any given account, but places no limits on what a client can do once connected. In addition, setting max_user_connections does not enable management of individual accounts. Both types of control are of interest to MySQL administrators.

max_connections

同时允许的最大客户端连接数.经过 默认值为151

The maximum permitted number of simultaneous client connections. By default, this is 151


通过 dagon 进行评论:


comment by dagon :

max_connections =总连接限制
max_user_connections =每个用户的限制

max_connections = the total connection limit
max_user_connections = the per user limit


因此,max_user_connections的值不得超过max_connections的值.


Hence, the value of max_user_connections must never exceed the value of max_connections.

这篇关于MySQL max_user_connections与max_connections的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆