Jump to content

User priviledges question


coza73

Recommended Posts

Is it possible to setup a mysql user to be able to create new databases but only be able to access/edit/see their own databases, and none of the existing databases or ones created by other users?

i.e multible uses on one server creating, editing and removing their own databases with no access to any other databases on the server. And root to have global access to all databases created.

Thanks.
Link to comment
https://forums.phpfreaks.com/topic/20089-user-priviledges-question/
Share on other sites

The following GRANT should allow the users to create databases starting with "username_" and unless there's an error already in the permissions, users shouldn't be able to see databases they haven't been given explicit access to.

[code]
GRANT ALL ON `username\_%`.* TO username@localhost;
GRANT ALL ON `username\_%`.* TO [email protected];
[/code]

Users by default have access to Db 'test' btw.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.