I'm getting following error when I try to log onto phpMyAdmin.
User ** already has more than 'max_user_connections' active connections
Could anyone let me know how to close these DB connections from MySQL server end?
Thank you for your time!
For MAX_USER_CONNECTIONS , the limit is an integer representing the maximum number of simultaneous connections by the account. If this limit is set to zero, the global max_user_connections system variable value determines the number of simultaneous connections.
mysql> set global max_connections = 200; The above command will increase max connections without restart but once the server is restarted, the changes will be gone. This method is useful to increase available connections in a production system such as a website/app, without having to restart your database server.
Read max_connections document to solve your problem
If clients encounter Too many connections errors when attempting to connect to the mysqld server, all available connections are in use by other clients.
The permitted number of connections is controlled by the max_connections system variable. The default value is 151 to improve performance when MySQL is used with the Apache Web server. To support more connections, set max_connections to a larger value.
First: Check your current database max_connection variable
SHOW VARIABLES LIKE 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+
Then Try to increase the max_connection parameter either with running command like:
SET GLOBAL max_connections = 300;
Or set this parameter in my.cnf that located at /etc/my.cnf
vi /etc/my.cnf
max_connections = 300
Finally: Restart mysql service
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With