I want to list the user who have a common privilege. For example, I wwant to liste all users who cant execute a specific stored procedure.
Any ideas ?
Thank you in advance
I want to list the user who have a common privilege. For example, I wwant to liste all users who cant execute a specific stored procedure.
Any ideas ?
Thank you in advance
You can start with this :
SELECT * FROM information_schema.user_privileges where PRIVILEGE_TYPE ="TRIGGER"
SELECT user, host FROM mysql.user WHERE Execute_priv = 'N';
or
SELECT DISTINCT a.grantee
FROM information_schema.user_privileges AS a
WHERE NOT EXISTS(
SELECT *
FROM information_schema.user_privileges
WHERE grantee = a.grantee
AND privilege_type = "EXECUTE"
);