nerdexam
Oracle

1Z0-888 · Question #61

You want to immediately stop access to a database server for remote user 'mike'@'client.example.com'. This user is currently not connected to the server. Which two actions can you take to stop any…

The correct answer is D. Use DROP USER 'mike'@'client.example.com'; E. Use GRANT USAGE ON *.* TO 'mike'@'client.example.com' MAX_USER_CONNECTIONS=0. Dropping the user (D) permanently removes the account from MySQL, making any future connection attempt fail immediately - the most decisive way to revoke access. Setting MAX_USER_CONNECTIONS=0 (E) limits the user to zero concurrent connections, blocking new logins without…

Security

Question

You want to immediately stop access to a database server for remote user 'mike'@'client.example.com'. This user is currently not connected to the server. Which two actions can you take to stop any access from the user? (Choose two.)

Options

  • AUse ALTER USER 'mike'@'client.example.com' PASSWORD EXPIRE;
  • BUse REVOKE ALL PRIVILEGES FROM 'mike'@'client.example.com';
  • CExecute the mysql_secure_installation command.
  • DUse DROP USER 'mike'@'client.example.com';
  • EUse GRANT USAGE ON . TO 'mike'@'client.example.com' MAX_USER_CONNECTIONS=0;
  • FUse ALTER USER 'mike'@'client.example.com' ACCOUNT LOCK;

How the community answered

(17 responses)
  • B
    6% (1)
  • C
    12% (2)
  • D
    82% (14)

Explanation

Dropping the user (D) permanently removes the account from MySQL, making any future connection attempt fail immediately - the most decisive way to revoke access. Setting MAX_USER_CONNECTIONS=0 (E) limits the user to zero concurrent connections, blocking new logins without altering privileges or removing the account.

Note: There is a known ambiguity here. In standard MySQL 8.0, MAX_USER_CONNECTIONS=0 in a GRANT statement actually means "inherit the global limit," not "block all connections." Many exam guides and candidates consider F (ACCOUNT LOCK) to be the stronger, clearer second answer - it explicitly locks the account so the user cannot authenticate. If you see this question on a live exam, D + F is arguably more technically accurate; be aware your exam version may differ.

Why the others are wrong:

  • A (PASSWORD EXPIRE): Forces the user to reset their password on next login - it doesn't prevent login entirely, and a savvy user could still connect and change the password.
  • B (REVOKE ALL PRIVILEGES): Removes privileges but leaves the account intact; GRANT USAGE always remains, so the user can still connect to the server, just with nothing to do.
  • C (mysql_secure_installation): A one-time hardening script for initial server setup; it has no targeted effect on a specific user account.

Memory tip: Think of it as two levels of "killing access" - DROP nukes the account entirely (nuclear option), while ACCOUNT LOCK / MAX_USER_CONNECTIONS=0 is a "freeze in place" - the account exists but can't be used.

Topics

#user account management#access control#connection limits#account removal

Community Discussion

No community discussion yet for this question.

Full 1Z0-888 Practice