Skip to main content

GRANT, REVOKE & SHOW GRANTS

Learn GRANT, REVOKE & SHOW GRANTS (User Management & Security, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Introduction GRANT gives privileges to an account at a chosen scope: global ( *.* ), a database ( db.* ), a table ( db.tbl ), specific columns, or a routine. REVOKE removes them, and SHOW GRANTS FOR displays what an account has. In MySQL 8 the user must already exist (GRANT no longer creates users).

More lessons in User Management & Security