Giving user exact amount of MySQL databases

Solution 1:

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.

Solution 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