10bet网址
MySQL Information Schema
Related Documentation Download this Excerpt
PDF (US Ltr)- 0.7Mb
PDF (A4)- 0.7Mb


MySQL Information Schema/INFORMATION_SCHEMA General Tables/ The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table

4.33 The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table

TheSCHEMA_PRIVILEGEStable provides information about schema (database) privileges. It takes its values from themysql.dbsystem table.

TheSCHEMA_PRIVILEGEStable has these columns:

  • GRANTEE

    The name of the account to which the privilege is granted, in'user_name'@'host_name'format.

  • TABLE_CATALOG

    The name of the catalog to which the schema belongs. This value is alwaysdef.

  • TABLE_SCHEMA

    The name of the schema.

  • PRIVILEGE_TYPE

    The privilege granted. The value can be any privilege that can be granted at the schema level; seeGRANT Statement. Each row lists a single privilege, so there is one row per schema privilege held by the grantee.

  • IS_GRANTABLE

    YESif the user has theGRANT OPTIONprivilege,NOotherwise. The output does not listGRANT OPTIONas a separate row withPRIVILEGE_TYPE='GRANT OPTION'.

Notes

The following statements arenotequivalent:

SELECT ... FROM INFORMATION_SCHEMA.SCHEMA_PRIVILEGES SHOW GRANTS ...