Home »
MCQs »
MariaDB MCQs
Which is the correct MariaDB query to lock an existing user?
48. Which is the correct MariaDB query to lock an existing user?
- CREATE USER 'alex'@'localhost' ACCOUNT LOCK;
- ALTER USER 'alex'@'localhost' ACCOUNT LOCK;
- ALTER USER 'alex'@'localhost' LOCK;
- ALTER USER LOCK 'alex'@'localhost';
Answer: B) ALTER USER 'alex'@'localhost' ACCOUNT LOCK;
Explanation:
The correct MariaDB query to lock an existing user is:
Syntax:
ALTER USER 'alex'@'localhost' ACCOUNT LOCK;