1Z0-908 practice question 4 of 25

Which two MySQL Server accounts are locked by default? (Choose two.)

Full set: 140 questions
Answer options
A: any user set as DEFINER for stored programs
B: any internal system accounts Correct answer
C: any new ROLE accounts Correct answer
D: any user created without a password
E: any user created with a username, but missing the host name
Correct Answer:
B. any internal system accounts; C. any new ROLE accounts
Explanation

In MySQL 8.0, certain accounts are locked by default to enhance security by preventing direct client connections. Internal system accounts (e.g., mysql.sys, mysql.session), used by server components and plugins, are created in a locked state. This ensures they are only used for their intended internal purposes. Similarly, roles, which are named collections of privileges rather than traditional user accounts, are also created in a locked state by default. This prevents any attempt to use a role name to log in to the server directly; roles are meant to be granted to user accounts to manage privileges efficiently.

Why Incorrect

A. A DEFINER specifies the security context for a stored object; using an account as a definer does not inherently lock it.
D. Creating a user without a password is not permitted with the default authentication plugin and does not result in a locked account with other plugins.
E. A user created without a specified host name defaults to '%' (any host), creating a standard, unlocked account.

References

1. MySQL 8.0 Reference Manual, 6.2.11 System and Internal Accounts: "System accounts are locked by default to prevent client connections. The mysql.sys account is a system account. The mysql.session and mysql.infoschema accounts are internal accounts."

2. MySQL 8.0 Reference Manual, 13.7.1.2 CREATE USER Statement: Under the description of the ACCOUNT LOCK | UNLOCK clause, it states: "Roles are created in a locked state and cannot be used to connect to the server."

3. MySQL 8.0 Reference Manual, 6.2.10 Using Roles: "A role is a named collection of privileges. You can use roles to administer privileges for user accounts." This reference clarifies that roles are not standard user accounts for connection purposes.

Scroll to Top