I've got the users: root, lmanager.
And too, a few databases: db1, db2, db3,…
I want to grant all privileges to user 'root' over all databases, except for the db2.
The user 'lmanager' will get all permissions only to db2.
It is possible to make it work?
it is possible to make db2 'invisible' to user root?
If it's possible, how i can do it?
Thanks in advance!
Best Answer
Unfortunately, you must do lots of these:
The syntax of
GRANT
/REVOKE
is too clumsy to get what you want in any easier way.You could write a query something like this to generate them:
Then manually execute them.
Precede that by doing a
GRANT USAGE TO ...
to provide the password.