1

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?

2 Answers 2

5

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.

1
  • 2
    Agreed - this is how most shared webhosting companies solve this problem.
    – EEAA
    Apr 23, 2010 at 21:43
2

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

1
  • 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.
    – Shane
    Apr 23, 2010 at 20:58

You must log in to answer this question.