How to limit the max mysql connection(queries) per user?

kelvinchan

New member
Joined
Mar 20, 2005
Messages
4
Recently, one of the users in my DA used over 50% of the number of the max mysql connections.To prevent this happen again,
i am now seeking the method to limit the max mysql connections of each database(or even better, of each DA users). Does anyone know how to do it?
Thankyou.
 
Last edited:
phpMyAdmin can do this.
Logged in as either da_admin or root goto the privileges page. Edit the user(s) in question. On that page you can limit the number of resources that user is allowed.
I don't think it's possible to do it on a per-database level, at least through phpmyadmin.

I've attached a screenshot of the page your looking for
 

Attachments

  • phpmyadmin.png
    phpmyadmin.png
    21.3 KB · Views: 623
Hum, and where can I say : only 10 connections for this user in the same time ?
 
Excellent, although I probably won't be enforcing such a rule (for the most part).
It's to bad it's only on the 5.x line. I haven't looked at any of the upgrade/release notes, but I wonder how the upgrade will go from 4.1 to 5.x.
4.0 to 4.1 wasn't particularly smooth with the password issue.
 
In fact I would like to limit the number of connection by database, and i don't know where i can configure that.

Edit : is it this line : MAX_USER_CONNECTIONS 2 ?

mysql> GRANT ALL ON customer.* TO 'francis'@'localhost'
-> IDENTIFIED BY 'frank'
-> WITH MAX_QUERIES_PER_HOUR 20
-> MAX_UPDATES_PER_HOUR 10
-> MAX_CONNECTIONS_PER_HOUR 5
-> MAX_USER_CONNECTIONS 2;
 
Last edited:
hello

I would like to know how to access the server configuration of phpmyadmin?

I tried da_admin and root with admin and server passwords, but nothing worked.

thanks,
 
hi,
sorry for delay, but if you search it again..

the mysql password of da_admin is in this file :

/usr/local/directadmin/conf/mysql.conf
 
Back
Top