Reputation: 2592
Follow up question for question: https://stackoverflow.com/questions/9478733/dynamically-change-the-number-of-db-connections-on-wordpress
I understand that I need to change the max_user_connections param, but can I do that dynamically? via code?
Upvotes: 1
Views: 373
Reputation: 9124
You can do it per-user, with:
GRANT ALL ON db.* TO 'user'@'localhost'
WITH
MAX_QUERIES_PER_HOUR 20
MAX_UPDATES_PER_HOUR 10
MAX_CONNECTIONS_PER_HOUR 5
MAX_USER_CONNECTIONS 2;
Changing it globally means to change the max_user_connections
global system variable; it can be changed dynamically while the server is running by means of the SET
statement.
Upvotes: 3