I would like to audit my database to check which users have been granted individual EXECUTE permission to which procedure.
I would like to use this information to be able to save GRANTs when changing (DROP+CREATE) the definition of some procedure in order to restore them after.
How can I query the INFORMATION_SCHEMA or MYSQL schemas to retrieve that information?
Update I'm interested in a solution working on MySQL 5.6+.
For granular security, users of our datase are not granted an EXECUTE permission on the whole schema but on specific stored procedures. Answers on schema-level permissions are irrelevant.
Best Answer
This script executes and shows all privileges associated for account.
SHOW GRANTS FOR 'antonio'@'antonio@gmail.com';