MySQL’s default configuration sets the maximum concurrent connections to 151. If you get a too many connections error when you are trying to connect to MySQL server, this means that all available connections are in use by other clients / Users.
The number of connections permitted is controlled by the max_connections system variable. Its default value is 151, although you can it can accept a max of 152 connection (1 Connection reserved for Super User). If you need to support more connections, you can set a larger value for this .
# vi /etc/my.cnf set-variable = max_connections = 170
MySQL 4.x and 5.x:
# vi /etc/my.cnf max_connections = 170
Restart MySQL once you’ve made the changes.
service mysqld restart
You can also change this variable after logging into mysql server as a root user.
Find the existing limit :
show variables like ‘max_connections’;
Set the updated maximum connection limit :
SET GLOBAL max_connections = 170;