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.
1 Answer
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.
4 Comments
DonCallisto
What if the DB doesn't exist and user want to create a new one?
talha2k
database does not have to exist yet. new_user can login and create the database.
likenoother
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?
likenoother
I guess what I need to a MySQL installation for each user.