Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.1Mb
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  / ...  / INFORMATION_SCHEMA Tables  / INFORMATION_SCHEMA General Tables  /  The INFORMATION_SCHEMA USER_PRIVILEGES Table

24.3.30 The INFORMATION_SCHEMA USER_PRIVILEGES Table

TheUSER_PRIVILEGES table provides information about global privileges. It takes its values from themysql.user system table.

TheUSER_PRIVILEGES table 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. This value is alwaysdef.

  • PRIVILEGE_TYPE

    The privilege granted. The value can be any privilege that can be granted at the global level; seeSection 13.7.1.4, “GRANT Statement”. Each row lists a single privilege, so there is one row per global privilege held by the grantee.

  • IS_GRANTABLE

    YES if the user has theGRANT OPTION privilege,NO otherwise. The output does not listGRANT OPTION as a separate row withPRIVILEGE_TYPE='GRANT OPTION'.

Notes

The following statements arenot equivalent:

SELECT ... FROM INFORMATION_SCHEMA.USER_PRIVILEGESSHOW GRANTS ...