By default MySQL set the max connections to 151.

 

This will increase the max connections:

nano /etc/my.cnf

 

In the my.cnf put in the belw 2 lines:

 

[mysqld]

open_files_limit = 8000

max_connections = 1000

 

Save the file and restart mysql.

service mysqld restart