what is the best way to offer db creation privelege?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

what is the best way to offer db creation privelege?

Post by raghavan20 »

I have a situation where I do not want to allow the user to drop databases and not to grant priveleges to others and offer select only on mysql and information_schema databases?

What are the set of statements that would create the above rules?

Code: Select all

grant select on *.* to mysql.* to somebody@localhost
grant select on *.* to information_schema.* to somebody@localhost

OR

if offered,
grant all on *.* to somebody@localhost

then we can,
revoke grant option on *.* to somebody@localhost
revoke drop, delete, update, insert on mysql.* from somebody@localhost
revoke drop, delete, update, insert on information_schema.* from somebody@localhost

but still I do not know how to allow the user to create databases

anybody know the command to do it?
Post Reply