Complete the code to grant SELECT privilege on the database 'shop' to user 'alice'.
GRANT [1] ON shop.* TO 'alice'@'localhost';
The SELECT privilege allows the user to read data from tables.
Complete the code to grant all privileges on the 'employees' table to user 'bob'.
GRANT [1] ON company.employees TO 'bob'@'%';
ALL PRIVILEGES grants every permission on the specified table.
Complete the code to grant INSERT privilege on all tables in 'sales' database to user 'carol'.
GRANT [1] ON sales.* TO 'carol'@'localhost';
The correct syntax is GRANT INSERT ON sales.* TO 'carol'@'localhost';. Fill in the privilege INSERT.
Fill both blanks to grant DELETE and UPDATE privileges on 'inventory' database to user 'dave'.
GRANT [1], [2] ON inventory.* TO 'dave'@'localhost';
To grant multiple privileges, list them separated by commas. Here, DELETE and UPDATE are the correct privileges.
Fill the blanks to grant SELECT privilege on 'reports' database and flush privileges.
GRANT [1] ON reports.* TO 'eve'@'%'; [2];
The first blank is the privilege SELECT. After granting privileges, it's common to run FLUSH PRIVILEGES to reload them.