0
0
MySQLquery~10 mins

Revoking privileges in MySQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to revoke SELECT privilege from user 'alice' on database 'shop'.

MySQL
REVOKE [1] ON shop.* FROM 'alice'@'localhost';
Drag options to blanks, or click blank then click option'
ASELECT
BINSERT
CUPDATE
DDELETE
Attempts:
3 left
💡 Hint
Common Mistakes
Using INSERT instead of SELECT will revoke the wrong privilege.
Forgetting to specify the correct database and tables.
2fill in blank
medium

Complete the code to revoke ALL privileges from user 'bob' on the database 'inventory'.

MySQL
REVOKE [1] ON inventory.* FROM 'bob'@'%';
Drag options to blanks, or click blank then click option'
ADELETE
BSELECT
CALL PRIVILEGES
DUPDATE
Attempts:
3 left
💡 Hint
Common Mistakes
Using only SELECT or UPDATE revokes just one privilege, not all.
Forgetting to specify the correct user host.
3fill in blank
hard

Fix the error in the code to revoke INSERT privilege from user 'carol' on all databases.

MySQL
REVOKE [1] ON *.* FROM 'carol'@'localhost';
Drag options to blanks, or click blank then click option'
AINSERTS
BINSERT
CINSRT
DINSET
Attempts:
3 left
💡 Hint
Common Mistakes
Misspelling privilege names like INSERTS or INSRT.
Using plural forms which are invalid.
4fill in blank
hard

Fill both blanks to revoke UPDATE privilege from user 'dave' on the 'sales' database.

MySQL
REVOKE [1] ON [2] FROM 'dave'@'192.168.1.10';
Drag options to blanks, or click blank then click option'
AUPDATE
Bsales.*
Csales
D*.*
Attempts:
3 left
💡 Hint
Common Mistakes
Using just the database name without .* to specify tables.
Choosing the wrong privilege to revoke.
5fill in blank
hard

Fill all three blanks to revoke DELETE privilege from user 'eve' on the 'marketing' database.

MySQL
REVOKE [1] ON [2] FROM '[3]'@'localhost';
Drag options to blanks, or click blank then click option'
ADELETE
Bmarketing.*
Ceve
Dadmin
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong privilege names or database names.
Mixing up usernames or hostnames.