2

Is there a way of giving a user full permissions to create new databases etc, but cannot access or see databases created by other users? I need multiple users to be able to create their own databases as if super user, but not be able to effect other user databases.

0

1 Answer 1

2

Some thing like this may help.

GRANT ALL PRIVILEGES ON new_user\_% . * TO 'new_user'@'%';

this will grant new_user only access to database created by himself. You can do the same with others.

Hope this helps.

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

4 Comments

What if the DB doesn't exist and user want to create a new one?
database does not have to exist yet. new_user can login and create the database.
Does this require all the databases to have the corresponding username as prefix? I need to do this for each database the user will create?
I guess what I need to a MySQL installation for each user.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.