Vinod Patidar
Vinod Patidar

Reputation: 11

How to limit number of connections to one database on MySQL

I am search in MySQL user connection limit in particular database, we got option user connection limit in overall database but not find any step which is provide connection limit on particular database level, if any one have some solution please let me know

Upvotes: 0

Views: 1825

Answers (2)

Hossam Aldeen Ahmed
Hossam Aldeen Ahmed

Reputation: 782

log in to your server as root user go to phpmyadmin in variables section you can change

MAX_USER_CONNECTIONS 

to a bigger number

Upvotes: 0

Jonathan
Jonathan

Reputation: 1564

You want to look at the 'account' level limitations:

http://dev.mysql.com/doc/refman/5.0/en/user-resources.html

You should already have a user for that database, and you can then set

MAX_QUERIES_PER_HOUR <number>
MAX_UPDATES_PER_HOUR <number>
MAX_CONNECTIONS_PER_HOUR <number>
MAX_USER_CONNECTIONS <number>

from a GRANT statement. (You dont need all of them, maybe just MAX_USER_CONNECTIONS)

Upvotes: 1

Related Questions