Resource icon

Error: "Failed to connect to database. User admin already has more than ‘max_user_connection"

Plesk backup error: Failed to connect to database. User admin already has more than ‘max_user_connections’ active connections

You might come across this error many times whenever you attained maximum limit in connection. It is more common to allocate database connections and also, you cannot add more new connections. This is because too many scripts may be opened at a time in database. You want to close the previous connection if you want to open new connection.

At that time, you will be thrown with a message saying “Failed to connect database. User admin already has more than ‘max_user_connections’ active connections.

In this situation, you can use the query to find out which connection is open or closed.

Code:
SELECT max_user_connections FROM mysql.user
WHERE user='db_user' AND host='localhost';
If nonzero value exist then try up with

Code:
GRANT USAGE ON*.*TOdb_user@localhostWITH MAX_USER_CONNECTIONS 0;
You have another option to use the query:

Code:
UPDATEmysql.userSETmax_user_connections=0
WHEREuser='db_user'AND host='localhost';
FLUSH PRIVILEGES;
To change the global setting, mysqld will help you to get touch with db_user@localhost. Using the global setting, you can adjust the variable as

Code:
SHOW VARIABLES LIKE ‘max_user_connections’;
If you are not good at query, go on technical wise. Follow up below steps for technical usage:

Step 1: In window server, RDP into it.

Step 2: Now, edit the C:\Program Files\ Paralles\Plesk\My SQL\Data\my.ini

Here, you can set the parameters for max_user_connection. Its your choice to remove or increase the value for max_user_connection.

We know its tough to deal with database connection problems. We have given you two choice one as technical and another one as query based. Choose which one suits you the more and fix the problem as soon as possible. Few users would prefer to close the previous connection and wills to start the new connection. Certainly, it may work out and fails at more situation. Don’t worry about it! Refer our suggestions to get limitations.
Author
bhawanisingh
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from bhawanisingh

Top