SHOW Statements A privilege granted to an account is always in effect, but a role is not. The active roles for an account can differ across and within sessions, depending on the value of the  activate_all_roles_on_login  system variable, the account default roles, and whether  SET ROLE  has been executed within a session. MySQL 8.0.16 and higher supports partial revokes of global privileges, such that a global privilege can be restricted from applying to particular schemas (see Section 6.2.12, “Privilege Restriction Using Partial Revokes” ). To indicate which global schema privileges have been revoked for particular schemas,  SHOW GRANTS  output includes  REVOKE  statements: SHOW GRANTS  does not display privileges that are available to the named account but are granted to a different account. For example, if an anonymous account exists, the named account might be able to use its privileges, but  SHOW GRANTS  does not display them. SHOW GRANTS  displays mandatory roles named in the  mandatory_roles  system variable value as follows: 2934 • SHOW GRANTS  without a  FOR  clause displays privileges for the current user, and includes mandatory roles. • SHOW GRANTS FOR  user  displays privileges for the named user, and does not include mandatory roles. mysql>  SHOW GRANTS FOR ’u1’@’localhost’ USING ’r1’; +---------------------------------------------+ | Grants for u1@localhost | +---------------------------------------------+ | GRANT USAGE ON *.* TO ‘u1‘@‘localhost‘ | | GRANT SELECT ON ‘db1‘.* TO ‘u1‘@‘localhost‘ | | GRANT ‘r1‘@‘%‘,‘r2‘@‘%‘ TO ‘u1‘@‘localhost‘ | +---------------------------------------------+ mysql>  SHOW GRANTS FOR ’u1’@’localhost’ USING ’r2’; +-------------------------------------------------------------+ | Grants for u1@localhost | +-------------------------------------------------------------+ | GRANT USAGE ON *.* TO ‘u1‘@‘localhost‘ | | GRANT INSERT, UPDATE, DELETE ON ‘db1‘.* TO ‘u1‘@‘localhost‘ | | GRANT ‘r1‘@‘%‘,‘r2‘@‘%‘ TO ‘u1‘@‘localhost‘ | +-------------------------------------------------------------+ mysql>  SHOW GRANTS FOR ’u1’@’localhost’ USING ’r1’, ’r2’; +---------------------------------------------------------------------+ | Grants for u1@localhost | +---------------------------------------------------------------------+ | GRANT USAGE ON *.* TO ‘u1‘@‘localhost‘ | | GRANT SELECT, INSERT, UPDATE, DELETE ON ‘db1‘.* TO ‘u1‘@‘localhost‘ | | GRANT ‘r1‘@‘%‘,‘r2‘@‘%‘ TO ‘u1‘@‘localhost‘ | +---------------------------------------------------------------------+ Note mysql>  SET PERSIST partial_revokes = ON; mysql>  CREATE USER u1; mysql>  GRANT SELECT, INSERT, DELETE ON *.* TO u1; mysql>  REVOKE SELECT, INSERT ON mysql.* FROM u1; mysql>  REVOKE DELETE ON world.* FROM u1; mysql>  SHOW GRANTS FOR u1; +--------------------------------------------------+ | Grants for u1@% | +--------------------------------------------------+ | GRANT SELECT, INSERT, DELETE ON *.* TO ‘u1‘@‘%‘ | | REVOKE SELECT, INSERT ON ‘mysql‘.* FROM ‘u1‘@‘%‘ | | REVOKE DELETE ON ‘world‘.* FROM ‘u1‘@‘%‘ | +--------------------------------------------------+