O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Checking grants

You can check all the user's grants. Check grants for the employee_col_ro user:

mysql> SHOW GRANTS FOR 'employees_ro'@'%'\G*************************** 1. row ***************************Grants for employees_ro@%: GRANT USAGE ON *.* TO `employees_ro`@`%`*************************** 2. row ***************************Grants for employees_ro@%: GRANT SELECT (`first_name`, `last_name`) ON `employees`.`employees` TO `employees_ro`@`%`*************************** 3. row ***************************Grants for employees_ro@%: GRANT SELECT (`salary`) ON `employees`.`salaries` TO `employees_ro`@`%`

Check grants for the dbadmin user. You can see all the grants that are available to the dbadmin user:

mysql> SHOW GRANTS FOR 'dbadmin'@'%'\G ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required