我想列出拥有共同权限的用户。 例如,我想听取所有不能执行特定存储过程的用户。
有什么想法吗?
提前谢谢
答案 0 :(得分:0)
SELECT user, host FROM mysql.user WHERE Execute_priv = 'N';
或
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"
);