USER_PRIVILEGES 表提供有关全局权限的信息。它的值来自 mysql.user 系统表。The USER_PRIVILEGES table provides
information about global privileges. It takes its values from the
mysql.user system table.
USER_PRIVILEGES 表包含以下列:The USER_PRIVILEGES table has these
columns:
GRANTEE授予权限的账户名称,格式为
'。The name of the account to which the privilege is granted, inuser_name'@'host_name''format.user_name'@'host_name'TABLE_CATALOG目录的名称。此值始终为
def。The name of the catalog. This value is alwaysdef.PRIVILEGE_TYPE授予的权限。该值可以是任何可以在全局级别授予的权限;参见 第 15.7.1.6 节,“GRANT 语句”。每行列出单个权限,因此每个受赠者拥有的全局权限对应一行。The privilege granted. The value can be any privilege that can be granted at the global level; see Section 15.7.1.6, “GRANT Statement”. Each row lists a single privilege, so there is one row per global privilege held by the grantee.
IS_GRANTABLEYES如果用户拥有GRANT OPTION权限,否则为NO。输出不会将GRANT OPTION显示为单独的行,且PRIVILEGE_TYPE='GRANT OPTION'。YESif the user has theGRANT OPTIONprivilege,NOotherwise. The output does not listGRANT OPTIONas a separate row withPRIVILEGE_TYPE='GRANT OPTION'.
注释Notes
USER_PRIVILEGES是一个非标准的INFORMATION_SCHEMA表。USER_PRIVILEGESis a nonstandardINFORMATION_SCHEMAtable.
下面的语句 不 等效:The following statements are not equivalent:
SELECT ... FROM INFORMATION_SCHEMA.USER_PRIVILEGES SHOW GRANTS ...