A schema is a database, so the
SCHEMATA table provides information
SCHEMATA table has these columns:
The name of the catalog to which the schema belongs. This value is always
The name of the schema.
The schema default character set.
The schema default collation.
This value is always
Schema names are also available from the
DATABASES statement. See
SHOW DATABASES Statement. The following statements are
SELECT SCHEMA_NAME AS `Database` FROM INFORMATION_SCHEMA.SCHEMATA [WHERE SCHEMA_NAME LIKE 'wild'] SHOW DATABASES [LIKE 'wild']
You see only those databases for which you have some kind of
privilege, unless you have the global
Because a global privilege is considered a privilege for all
databases, any global privilege enables a
user to see all database names with
DATABASES or by examining the