Delegation of authority
Delegation of authority solves the problem of centralized authorization. When you authorize a user, you can specify with admin/grant option to grant the user the authority to delegate the corresponding authority to other users. When you revoke the object or system authority of a user, the authorities delegated by the user are not revoked.
Delegation of authority
-
Delegation of authority failed
-
Log in to seekdb as the root user.
-
Create user A and grant the user the corresponding authority without the
with grant optionparameter.GRANT ALL PRIVILEGES ON *.* TO A IDENTIFIED BY '******';Query OK, 0 rows affected (0.034 sec) -
Log in as user A, create user B, and grant the same authority as that of user A to user B. An error is returned.
GRANT ALL PRIVILEGES ON *.* TO 'B' IDENTIFIED BY '******';ERROR 1227 (42501): Access denied; you need (at least one of) the GRANT privilege(s) for this operationtipIf you do not specify the
with grant optionparameter when you grant an authority to a user, the user cannot delegate the authority to other users.
-
-
Delegation of authority succeeded
-
Log in to seekdb as the root user.
-
Grant the corresponding authority to user A and specify the
with grant optionparameter. Example:GRANT ALL PRIVILEGES ON *.* TO A with grant option; -
Log in as user A, create user B, and grant the same authority as that of user A to user B. The grant succeeds.
GRANT ALL PRIVILEGES ON *.* TO 'B' IDENTIFIED BY '******';Query OK, 0 rows affected (0.058 sec)
-