加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – MySQL max_user_connections vs max_connections

发布时间:2020-12-13 21:53:52 所属栏目:PHP教程 来源:网络整理
导读:SADLY我无法在任何地方找到对此查询的任何直接解释,甚至在 MySQL文档中都没有. 各种论坛中的一些人说max_user_connections永远不会超过max_connections?例如:如果一个用户有3个max_user_connections而另一个用户有15个max_user_connections,那么他们说max_
SADLY我无法在任何地方找到对此查询的任何直接解释,甚至在 MySQL文档中都没有.

各种论坛中的一些人说max_user_connections永远不会超过max_connections?例如:如果一个用户有3个max_user_connections而另一个用户有15个max_user_connections,那么他们说max_connections必须至少高于3 15 = 18.

但是,mysql doc说,最大允许值为max_user_connections is 4294967295,它比最大允许值max_connections is 100000大很多.

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

解决方法

max_user_connections

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

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

dagon评论:

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

因此,max_user_connections的值绝不能超过max_connections的值.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读