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?


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.

  • 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.


  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy