0

Is there a way to create a user in MySQL that have login access but no databases, but it allows the user to create a new database to a limit of 5 or what ever I decide.

So basically what I want is to give a user access to create his own databases, but I dont want him to see other databases, also he should be limited to create only 5 databases

3
  • 1
    "to give a user access to create his own databases" - by granting the "create database" privilege? dev.mysql.com/doc/refman/5.5/en/… but I don't think you can limit that to only 5 databases. Commented Jul 31, 2014 at 8:56
  • Ok, ill go another route, will create a managment console might be easier (something like cpanel) Commented Jul 31, 2014 at 9:01
  • The scenario you are asking is exactly the one maintained by hosting providers creating a user and adding priveleges as in cpanel might help Commented Jul 31, 2014 at 10:03

1 Answer 1

1

There is no notion of "Database Owner" or "Database Creator" in MySQL, therefore there is no way to limit the number of databases created by a user.

Note: it is possible to put some restrictions at account-level, but not the ones you are looking for. You will need a third-party management tool for this.

Sign up to request clarification or add additional context in comments.

1 Comment

Cool, I will then look at cpanel or create my own

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.