Allowing Other Users to Grant Privileges


GRANT privileges ON db.table TO user@host IDENTIFIED BY 'password' WITH GRANT OPTION; 



Even granting ALL PRIVILEGES to a user does not enable that user to pass on those rights to another user on the system. In fact, it is rare that the database administrator would want to give that kind of access to another user, so a special instruction is needed in the GRANT statement.

By suffixing the GRANT command with WITH GRANT OPTION, you enable a user to use the privileges specified, and to reassign them to another user.

You should take care when using WITH GRANT OPTION. Although a user cannot grant another user a privilege he does not have, two users with different permissions could effectively combine their privileges!



MySQL Phrasebook. Essential Code and Commands
MySQL Phrasebook
ISBN: 0672328399
EAN: 2147483647
Year: 2003
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net