SCHEMA_PRIVILEGES 表提供有关模式(数据库)权限的信息。它的值取自 mysql.db 系统表。The SCHEMA_PRIVILEGES table provides
information about schema (database) privileges. It takes its
values from the mysql.db system table.
SCHEMA_PRIVILEGES 表具有以下列:The SCHEMA_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 to which the schema belongs. This value is alwaysdef.TABLE_SCHEMA模式的名称。The name of the schema.
PRIVILEGE_TYPE授予的权限。该值可以是任何可在模式级别授予的权限;请参见 第 15.7.1.6 节,“GRANT 语句”。每行列出单一权限,因此每个受赠者持有的模式权限都有一行。The privilege granted. The value can be any privilege that can be granted at the schema level; see Section 15.7.1.6, “GRANT Statement”. Each row lists a single privilege, so there is one row per schema 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
SCHEMA_PRIVILEGES是一个非标准的INFORMATION_SCHEMA表。SCHEMA_PRIVILEGESis a nonstandardINFORMATION_SCHEMAtable.
下面的语句 不 等效:The following statements are not equivalent:
SELECT ... FROM INFORMATION_SCHEMA.SCHEMA_PRIVILEGES SHOW GRANTS ...