SADLY i could not find any straight-forward explanation to this query anywhere, not even in MySQL documentations.
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
.
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.
Can somebody please explain how do these two options in MySQL impact one another.
For MAX_USER_CONNECTIONS , the limit is an integer representing the maximum number of simultaneous connections by the account. If this limit is set to zero, the global max_user_connections system variable value determines the number of simultaneous connections.
By default 151 is the maximum permitted number of simultaneous client connections in MySQL 5.5. If you reach the limit of max_connections you will get the “Too many connections” error when you to try to connect to your MySQL server. This means all available connections are in use by other clients.
To open for more connections, you can set a higher value for max_connections . To see the current value of max_connections , run this command: SHOW VARIABLES LIKE "max_connections"; By default, it's set to 151.
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
comment by dagon :
max_connections
= the total connection limitmax_user_connections
= the per user limit
Hence, the value of max_user_connections
must never exceed the value of max_connections
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With