Forums

MySQL max_user_connections Limit Exceeded – Unable to Access Console

I’ve encountered an issue where my MySQL user has exceeded the max_user_connections limit (currently set to 19). As a result, I am unable to:

Open the MySQL console, as it returns the error: ERROR 1226 (42000): User 'myusername' has exceeded the 'max_user_connections' resource (current value: 19) Console closed. Run any scripts or queries that require MySQL access. I have tried restarting the MySQL service using the Bash console, but I am still unable to access the database or kill existing connections.

Could you please help me terminate the stale or idle MySQL connections?

Are you using your MySQL database in a webapp? Do you use an ORM?

We have some more information on that error here: https://help.pythonanywhere.com/pages/ManagingDatabaseConnections/

yes mysql in a webapp... i resolved the issue.. just went in console and in tasks at the bottom of each page,, fetch tasks and then kill any tasks found then reload the web app again

Great, I'm glad you were able to fix it.