MySQL - Finding Grants for Tables
MySQL table grants are stored in the TABLE_PRIVILEGES table in the information_schema database in MySQL. To be able to see the grants defined in the table, the user needs to have permissions to view this table.
The following query will retrieve all grants for the table named employee contained in the database named sample:
SELECT
*
FROM
INFORMATION_SCHEMA.TABLE_PRIVILEGES
WHERE
table_schema = 'sample' AND
table_name = 'employee';
The TABLE_PRIVILEGES view can also be queried to determine table grants for a user. The following query will retrieve all table grants for the user testuser:
SELECT
*
FROM
INFORMATION_SCHEMA.TABLE_PRIVILEGES
WHERE
grantee like '%testuser%';