Pregunta

Say I grant all my privileges to a friend, and he has all my permissions to edit, select, delete, update etc. all my data.

Can my friend revoke me from my own database?

I believe he can grant my privileges to another person, or many people. Is there a way that can grant him just all my privileges but restrict him from handing out privileges to other people? Or at least it'll notify me when he tries to grant a privilege to someone?

Another question, if I grant my friend Bobby all my privileges, and he grant another person called Joey all his(my) privileges. Afterwards I revoke my friend's (Bobby) privileges, does my friend's friend (Joey) keep his privileges?

¿Fue útil?

Solución

The GRANT privilege is a separate privilege. As the MySQL documentation says, the GRANT privilege "Enable privileges to be granted to or removed from other accounts".

If you don't give your friend the GRANT privilege, he won't be able to change your privileges. It is only because you have the GRANT privilege that you can change his privileges.

See http://dev.mysql.com/doc/refman/5.1/en/grant.html#grant-privileges for details on how privileges work in MySQL.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top