More often, you receive Too many connections error when you attempt to connect MySQL server. This error is self-explanatory and tells that all available connections are being used by other clients. If you want to allow more simultaneous connections to the MySQL database, you may need to tweak the max_user_connections settings in my.cnf file. The following article will instruct you on how to increase MySQL connections.
NOTE: Following instructions are only applicable to VPS and Dedicated server users. Furthermore, you will need root access to modify my.conf file.
1. Log in to your Linux machine via SSH.
2. Edit my.cnf file using your choice of editors like vi, nano, vim, or pico.
[mysqld]
local-infile=0
datadir=/var/lib/mysql
user=mysql
symbolic-links=0
max_user_connections = 20
4. Change the value of max_user_connections to your required level. For example, we want to set the maximum connection value to 50.
max_user_connections = 50
5. Save the changes and close the editor.