nerdexam
Oracle

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…

Security

Question

The account [email protected] has been created with privileges, as shown in the output: mysql> SHOW GRANTS FOR [email protected]; +-------------------------------------------------------------+ | Grants for [email protected] | +-------------------------------------------------------------+ | GRANT SELECT ON . TO 'joe'@'example.com' | | GRANT UPDATE, DELETE ON 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

How the community answered

(44 responses)
  • A
    16% (7)
  • B
    70% (31)
  • C
    2% (1)
  • F
    9% (4)
  • G
    2% (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

#MySQL GRANT privileges#GRANT OPTION#User management#Access control

Community Discussion

No community discussion yet for this question.

Full 1Z0-888 Practice