MySQL max_user_connections vs max_connections

[英]MySQL max_user_connections vs max_connections


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

SADLY我無法在任何地方找到對此查詢的任何直接解釋,甚至在MySQL文檔中都沒有。

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.

各種論壇中的一些人說max_user_connections永遠不會超過max_connections?例如:如果一個用戶有3個max_user_connections而另一個用戶有15個max_user_connections,那么他們說max_connections必須至少高於3 + 15 = 18。

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 doc說,max_user_connections的最大允許值是4294967295,這比max_connections的最大允許值為100000要大得多。

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

有人可以解釋一下MySQL中的這兩個選項如何相互影響。

1 个解决方案

#1


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.

限制客戶端使用MySQL服務器資源的一種方法是將全局max_user_connections系統變量設置為非零值。這限制了任何給定帳戶可以同時進行的連接數,但對連接后客戶端可以執行的操作沒有限制。此外,設置max_user_connections不會啟用個人帳戶的管理。 MySQL管理員都對這兩種控件都很感興趣。

max_connections

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

允許的最大同時客戶端連接數。默認情況下,這是151


comment by dagon :

dagon的評論:

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

max_connections =總連接限制max_user_connections =每個用戶限制


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

因此,max_user_connections的值絕不能超過max_connections的值。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2015/05/03/790b98dd76bdf528edb31a79b1f5deb.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com