Wednesday, July 10, 2013

Max user connection for a 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;

No comments:

Post a Comment