Complete the code to create a new user named 'alice' with password 'mypassword'.
CREATE USER 'alice'@'localhost' IDENTIFIED BY '[1]';
The password must be specified after IDENTIFIED BY. Here, 'mypassword' is the correct password for user 'alice'.
Complete the code to create a user 'bob' who can connect from any host.
CREATE USER 'bob'@'[1]' IDENTIFIED BY 'secure123';
The '%' symbol means the user can connect from any host.
Fix the error in the code to create user 'carol' with password 'pass123'.
CREATE USER 'carol'@'localhost' IDENTIFIED [1] 'pass123';
The correct syntax is IDENTIFIED BY followed by the password.
Fill both blanks to create a user 'dave' who can connect from '192.168.0.10' with password 'davepass'.
CREATE USER 'dave'@'[1]' IDENTIFIED [2] 'davepass';
The host must be '192.168.0.10' and the keyword after IDENTIFIED is BY.
Fill all three blanks to create user 'eve' who can connect from any host with password 'eve123', and grant all privileges on database 'shop'.
CREATE USER 'eve'@'[1]' IDENTIFIED [2] '[3]'; GRANT ALL PRIVILEGES ON shop.* TO 'eve'@'[1]';
The '%' allows connection from any host, BY is the correct keyword, and 'eve123' is the password. The GRANT statement uses the same host.