The number of connections permitted is controlled by the max_connections system variable. How to modify max_connections value:

/etc/init.d/mysqld stop
mysqld_safe -O max_connections=1000 &
mysqladmin variables -u admin -ppassword | grep max_connections

or into /etc/my.cnf under the [mysqld] section add:

max_connections = 500

or log in mysql as root and execute:

SET GLOBAL max_connections = 500;

and restart MySQL:

/etc/init.d/mysqld start

Reference:dev.mysql.com