1Z0-888 · Question #89
The account [email protected] has been created with privileges, as shown in the output: mysql> SHOW GRANTS FOR [email protected]; +-------------------------------------------------------------+ | Grants…
The correct answer is B. CREATE USER [email protected] IDENTIFIED BY "jkk2@9bqLm4ljIaN'; D. GRANT INSERT ON audit.* TO [email protected]; E. GRANT DELETE ON world.* TO [email protected]. Joe can execute B, D, and E because WITH GRANT OPTION on world. grants him two abilities: it permits him to delegate any privilege he holds (covering D - passing INSERT on audit. to jane) and also implicitly allows user account management via CREATE USER in MySQL 5.7 (covering…
Question
world.* TO 'joe'@'example.com' WITH GRANT OPTION |
| GRANT INSERT ON audit.* TO 'joe'@'example.com' |
+-------------------------------------------------------------+
3 rows in set (0.00 sec)
The account [email protected] does not exist.
Which three statements will succeed when executed by [email protected]? (Choose three.)Options
- AGRANT SELECT ON audit.* TO [email protected];
- BCREATE USER [email protected] IDENTIFIED BY "jkk2@9bqLm4ljIaN';
- CGRANT SELECT ON world.* TO [email protected];
- DGRANT INSERT ON audit.* TO [email protected];
- EGRANT DELETE ON world.* TO [email protected];
- FGRANT SELECT ON world.* TO [email protected] IDENTIFIED BY "jkk2@9bqLm4ljIaN';
- GGRANT SELECT ON world.* TO [email protected];
How the community answered
(44 responses)- A16% (7)
- B70% (31)
- C2% (1)
- F9% (4)
- G2% (1)
Explanation
Joe can execute B, D, and E because WITH GRANT OPTION on world.* grants him two abilities: it permits him to delegate any privilege he holds (covering D - passing INSERT on audit.* to jane) and also implicitly allows user account management via CREATE USER in MySQL 5.7 (covering B). Option E is the clearest case - Joe explicitly holds DELETE on world.* WITH GRANT OPTION, and in MySQL 5.7, granting a privilege to a non-existent user (mary) implicitly creates that account. Options A, C, F, and G all fail for the same reason: Joe holds SELECT on *.* but without WITH GRANT OPTION, meaning he can query using SELECT but cannot delegate that right to anyone - F fails even though the IDENTIFIED BY clause would otherwise create mary, because the SELECT grant itself is blocked.
Memory tip: Think of WITH GRANT OPTION as a "transferable ticket" - a privilege without it is single-use only (you can use it, not share it), while one with it is a wildcard pass that lets you hand copies to others.
Topics
Community Discussion
No community discussion yet for this question.