Chapter 21. The MySQL Data Dictionary
MySQL stores information about the data in the databases; this is called metadata. Much of this information is stored in the INFORMATION_SCHEMA database, following the SQL 2003 standard.
Tables in the INFORMATION_SCHEMA database are read-only, in-memory, and show data from various sources.
SHOW CREATE TABLE will show the tables as TEMPORARY, because they reside in memory and do not persist between mysqld restarts. INFORMATION_SCHEMA tables are called system views and they may be of different storage engine types. At the time of this writing all the system views are either the MEMORY, MyISAM, or Maria storage engine.
Regular SQL statements can be used to query them, though they have some special properties that other views do not have:
mysqldumpwill not export any information (data, schema) fromINFORMATION_SCHEMAsystem viewsThere is no data directory for the
INFORMATION_SCHEMAdatabaseThere is no
.frmfile associated with theINFORMATION_SCHEMAviews. The definitions are hard-coded into the database.
The table definitions for the data dictionary are hard-coded into the source code, and loaded when mysqld starts. Unlike other databases, there is no directory in the datadir for the INFORMATION_SCHEMA database. All users have permission to see the INFORMATION_SCHEMA database; however, they can only see the objects they have permission to see. ...