I found MySQL was being annoying earlier and not ‘accepting’ my max_connections = 450 directive on a Debian Wheezy install, and being seemingly stuck on having 214 connections….
It turns out, Debian Wheezy doesn’t have pam_limits.so enabled by default in /etc/pam.d/* files. (But it is commented out, so easy enough to put into place).
Once that’s enabled, you can edit /etc/security/limits.conf and adjust the levels appropriately.
e.g.
/etc/security/limits.conf :
* hard nofile 8192 * soft nofile 4096
/etc/my.cnf:
max_connections = 450
and now :
mysql> show variables like '%max_connecti%'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 450 | +-----------------+-------+ 1 row in set (0.00 sec)