Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If I wanted to grant user 'abc' to create exact amount of databases ( for example 10 ) how would I do this ? Or anything similar maybe?

share|improve this question

2 Answers 2

I have to agree with Rob, this restriction is not possible within MySQL itself, source: http://dev.mysql.com/doc/refman/5.0/en/user-resources.html

One solution is to build another layer (ie. a web interface), where users create databases. You could then track the number of databases that a user creates, and automatically restrict them. This is the approach some hosting companies use.

share|improve this answer
2  
Agreed - this is how most shared webhosting companies solve this problem. –  EEAA Apr 23 '10 at 21:43

Mmm. I'm not aware of a DB creation quota user parameter in MySQL.

You might just create 10 databases and name them sequentially, like abc_db1, abc_db2 and so on. Then grant user 'ABC' whatever rights they need.

Your ABC user then has 10 databases to work with, and if they need more, they can ask.

Rob

share|improve this answer
    
Agreed. If a user needs a limit set on how many databases they can make they should probably just be going to the DBA to create them in the first place. –  Sean Howat Apr 23 '10 at 20:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.