【问题标题】:MySQL max_user_connections vs max_connectionsMySQL max_user_connections 与 max_connections
【发布时间】:2015-05-03 22:58:07
【问题描述】:

遗憾的是,我无法在任何地方找到任何对此查询的直接解释,甚至在 MySQL 文档中也找不到。

各个论坛有人说max_user_connections永远不能大于max_connections?例如:如果一个用户有3 max_user_connections,而另一个用户有15 max_user_connections,那么他们说max_connections 必须至少高于3+15 = 18

但是,mysql 文档说,max_user_connections is 4294967295 的最大允许值比max_connections is 100000 的最大允许值大得多。

谁能解释一下 MySQL 中的这两个选项如何相互影响。

【问题讨论】:

  • 忽略限制,它们不会告诉您任何有关使用的信息,也不会用来解释差异
  • 我投票结束这个问题,因为它在手册中得到了明确的回答
  • 这里的具体查询是max_user_connections和max_connections之间的连接和关系......没有资源可以直接记录两者之间的关系......需要澄清...... ..因此我问了这个问题...请不要关闭它

标签: php mysql


【解决方案1】:

max_user_connections

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

max_connections

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


dagon评论:

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


因此,max_user_connections 的值不能超过max_connections 的值。

【讨论】:

  • 总结:max_connections = 总连接限制,max_user_connections = 每个用户限制
  • 这样就可以确认我的查询 max_user_connections 不能超过 max_connections... 对吧?
  • 感谢您的反馈...您能否编辑您的答案以包含该具体说明...我看到太多人在太多地方要求此说明,但没有任何直接联系或这样的评论
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-03-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多