Concurrent mysql connections

bellwood

Well-Known Member
PartnerNOC
Sep 25, 2012
88
43
143
New York
cPanel Access Level
DataCenter Provider
Would the following not work in /etc/my.cnf:

Code:
max_connections = 500
max_user_connections = 25
...where 500 would be the maximum connection limit to the daemon (whatever you deem appropriate for your deployment) and 25 would be the max connections per user:

REF: MySQL :: MySQL 5.7 Reference Manual :: 5.1.7 Server System Variables

If you didn't need this to be ubiquitous for the entire server, you could also limit per-user:

Code:
ALTER USER 'specificUser'@'localhost' WITH MAX_USER_CONNECTIONS 25;
REF: MySQL :: MySQL 5.7 Reference Manual :: 6.2.16 Setting Account Resource Limits