User 'root' has exceeded the 'max_user_connections' resource

Judd Taylor

Member
Aug 4, 2014
11
0
1
Melbourne, Victoria, Australia, Australia
cPanel Access Level
Root Administrator
Hi,

Running WHM 11.44.1 (build 18) with Cloudlinux 6.5 x86_64

In the last few days have been unable to run many features within WHM.

For example clicking "Restores a Full Backup / cpmove File" within WHM gives the error:

Cpanel::DBI::Mysql connect('','root',...) failed: User 'root' has exceeded the 'max_user_connections' resource (current value: -1) at /usr/local/cpanel/Cpanel/MysqlUtils/Connect.pm line 136


The error is consistent for other WHM features which involve MySQL. ie always User 'root' has exceeded the 'max_user_connections' resource (current value: -1)

Two recent changes have been:
- applying updates to ensure the server is doing an update due to the ShellShock vulnerability
- adding new IP and SSL certificate

In an attempt to resolve the issue I've modified /etc/my.cnf and added the line max_user_connections = 5000

This had no effect
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello :)

I've seen this reported after failed MySQL upgrades. In those cases, the resolution was to restart MySQL with skip-grant-tables, run "mysql_upgrade -s" to upgrade the system tables, and then restart MySQL without skip-grant-tables.

Could you let us know if these steps help?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
If restarting MySQL before starting that workaround does not help, then feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
To update, the user was able to resolve the issue through the use of the "mysql_upgrade" command.

Thank you.
 

Judd Taylor

Member
Aug 4, 2014
11
0
1
Melbourne, Victoria, Australia, Australia
cPanel Access Level
Root Administrator
A little more info for any who encounter similar issues...

Appears my issue was that my MySQL installation had become corrupted during a failed MySQL update.

In the end I was able to resolve the issue by following the instructions from MySQL Governor > Backing Up MySQL by running the following commands:

$ mkdir -p ~/mysqlbkp
$ service mysql restart --skip-networking --skip-grant-tables
$ mysql_upgrade
$ mysqldump --all-databases --routines --triggers > ~/mysqlbkp/dbcopy.sql
$ service mysql stop
$ cp -r /var/lib/mysql/mysql ~/mysqlbkp/
$ service mysql start