QuestionQ52

Database Security

Consider the following statement:

mysql> DROP ROLE r_role1, r_role2;  

Which two statements are true?

Choose two
  • A It fails if any of the roles is specified in the mandatory_roles variable.
  • B You must revoke r_role1 and r_role2 from all users and other roles before dropping the roles.
  • C Existing connections can continue to use the roles’ privileges until they reconnect.
  • D You must revoke all privileges from r_role1 and r_role2 before dropping the roles.
  • E It fails if you do not have the ADMIN OPTION of the roles r_role1 and r_role2.
  • F It fails if at least one of the roles does not exist.
Explanation

Roles listed in the mandatory_roles system variable cannot be dropped. Without an IF EXISTS clause, DROP ROLE returns an error if any specified role does not exist; the multi-role statement is rolled back if an error occurs. Dropping a role automatically revokes it from users and other roles, and affected current sessions have their privileges adjusted beginning with the next statement.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!