This error occurs, due to connection limit reaches the maximum limit, defined in the configuration file my.cnf
.
In order to fix this error, login to MySQL as root
user (Note: you can login as root, since, mysql will pre-allocate additional one connection for root user
) and increase the max_connections variable by using the following command:
SET GLOBAL max_connections = 500;
This change will be there, until next server restart. In order to make this change permanent, you have to modify in your configuration file. You can do this by,
vi /etc/my.cnf
[mysqld]
max_connections = 500
This article has detailed step by step workaround to fix this error. Have a look at it, I hope it may help you. Thanks.