nerdexam
Oracle

1Z0-908 · Question #26

Examine these statements and output: Which statement is true?

The correct answer is D. The user is authorized as the rsmith@localhost user. Option D is correct because in MySQL, authorization refers to the account matched in the grant tables (shown by CURRENT_USER()), and the output would show CURRENT_USER() returning rsmith@localhost - meaning MySQL found an explicit rsmith@localhost entry and granted privileges…

Security

Question

Examine these statements and output:

Which statement is true?

Exhibit

1Z0-908 question #26 exhibit

Options

  • AThe user is logged in with --user=accounting as an option.
  • BThe user is authenticated as the anonymous proxy user `'@'%'.
  • CThe user is authorized as the accounting@localhost user.
  • DThe user is authorized as the rsmith@localhost user.
  • EThe user failed to define a username and the connecting username defaulted to `'@'%'.

How the community answered

(21 responses)
  • A
    5% (1)
  • B
    10% (2)
  • C
    5% (1)
  • D
    81% (17)

Explanation

Option D is correct because in MySQL, authorization refers to the account matched in the grant tables (shown by CURRENT_USER()), and the output would show CURRENT_USER() returning rsmith@localhost - meaning MySQL found an explicit rsmith@localhost entry and granted privileges based on it.

Why each distractor is wrong:

  • A is wrong because --user=accounting is not a valid MySQL client flag syntax, and even if it were, that would describe the connecting username, not the authorized account.
  • B is wrong because the anonymous proxy account ''@'%' is only matched when no specific account is found - here, a valid named account was matched.
  • C is wrong because accounting@localhost would be the authorized account only if the grant tables matched that entry instead; the output indicates rsmith@localhost was the match.
  • E is wrong because a username was defined - the anonymous fallback ''@'%' only applies when no username is provided and no named match exists.

Memory tip: Think of MySQL authentication as two steps - who you say you are (USER()) vs. who MySQL says you are (CURRENT_USER()). "Authorized" questions always refer to the CURRENT_USER() result, i.e., the grant table match. If the output shows both functions returning the same value, the user connected and was matched under the same account.

Topics

#User Authentication#Authorization#MySQL User Accounts#Access Control

Community Discussion

No community discussion yet for this question.

Full 1Z0-908 Practice