increase max_connections for a particular database

Max user connection for a database can be increased by following query

mysql > GRANT ALL ON dbname.* TO ‘dbuser’@’localhost’
->     WITH MAX_USER_CONNECTIONS 200;

Similarly max queries, max connections, max updates can be increased with below query

mysql > GRANT ALL ON dbname.* TO ‘dbuser’@’localhost’
->     WITH MAX_QUERIES_PER_HOUR 20
->          MAX_UPDATES_PER_HOUR 10
->          MAX_CONNECTIONS_PER_HOUR 5 ;

GRANT ALL ON dbname.* TO ‘dbuser’@’localhost’
->     WITH MAX_QUERIES_PER_HOUR 20
->          MAX_UPDATES_PER_HOUR 10
->          MAX_CONNECTIONS_PER_HOUR 5
->          MAX_USER_CONNECTIONS 200;

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Replace MySQL with MariaDB in cPanel

MariaDB strives to be the logical choice for database professionals looking for a robust,...

Test MySQL database connection with php script

You can use the following php script which is used to test mysql database connection on your...

cPanel Log file locations

cPanel log file locations and Basic troubleshooting, most activity that happens on a server to...

MySQL downgrade on cPanel server

You know downgrades are not recommended, it’s always best to stick with a newer version and work...

How to repair corrupted mysql database

Sometimes it happens that your database get corrupted due to many reason like it does not get...

Powered by WHMCompleteSolution