MySQL 8.0 Database Administrator — Question 15
Examine this statement:
mysql> DROP ROLE r_role1, r_role2;
Which two are true? (Choose two.)
Answer options
- 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.
Correct answer: C, E
Explanation
Option C is correct because existing connections retain access to the roles' privileges until they reconnect, making the privileges effective even after the roles are dropped. Option E is also correct since the command will fail if the user executing it does not have the ADMIN OPTION for the specified roles. The other options are incorrect as they misinterpret the requirements and behaviors associated with dropping roles in MySQL.