0

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

2 Answers2

0

You can start with this :

SELECT * FROM information_schema.user_privileges where PRIVILEGE_TYPE ="TRIGGER"
Léo R.
  • 2,620
  • 1
  • 10
  • 22
0
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" 
                     );
Rick James
  • 135,179
  • 13
  • 127
  • 222