Parse the information_schema database of MySQL

Source: Internet
Author: User

The information_schema database is generated after mysql 5.0. A virtual database does not exist physically.
The information_schema database is similar to the "Data Dictionary" and provides a way to access database metadata, that is, Data. For example, database name or table name, column type, and access permission (more detailed access method ).

Important tables include:
SCHEMATA table
--- The SCHEMATA table provides information about all databases in the current mysql instance. Is the result of show databases.
TABLES Table
--- The TABLES Table provides information about TABLES in the database (including views ). Describes in detail the schema, table type, table engine, creation time, and other information of a table. Is the result of show tables from schemaname.
COLUMNS table
--- The COLUMNS table provides the column information in the table. Describes all the columns of a table and the information of each column in detail. Is the result of show columns from schemaname. tablename.
STATISTICS table
--- The STATISTICS table provides information about table indexes. Is the result of show index from schemaname. tablename.
USER_PRIVILEGES table
--- The USER_PRIVILEGES table provides information about full-process permissions. This information is from the mysql. user authorization table. Non-standard table.
SCHEMA_PRIVILEGES table
--- The SCHEMA_PRIVILEGES table provides information about the schema (database) permission. This information is from the mysql. db authorization table. Non-standard table.
TABLE_PRIVILEGES table
--- The TABLE_PRIVILEGES table provides information about table permissions. This information is from the mysql. tables_priv authorization table. Non-standard table.
COLUMN_PRIVILEGES table
--- The COLUMN_PRIVILEGES table provides information about column permissions. This information is derived from the mysql. columns_priv authorization table. Non-standard table.
CHARACTER_SETS table
--- The CHARACTER_SETS table provides information about available character sets of mysql instances. This table is obtained from the show character set result SET.
COLLATIONS table
--- The COLLATIONS table provides control information about each character set.
COLLATION_CHARACTER_SET_APPLICABILITY table
--- The COLLATION_CHARACTER_SET_APPLICABILITY table specifies the character set that can be used for verification. These columns are equivalent to the first two display fields of show collation.
TABLE_CONSTRAINTS table
--- The TABLE_CONSTRAINTS table describes tables with constraints. And the constraint type of the table.
KEY_COLUMN_USAGE table
--- The KEY_COLUMN_USAGE table describes the restricted key columns.
ROUTINES table
--- The ROUTINES table provides information about stored subroutines (stored programs and functions. In this case, the ROUTINES table does not contain udfs ). The column named "mysql. proc name" specifies the mysql. proc table column corresponding to the INFORMATION_SCHEMA.ROUTINES table.
VIEWS table
--- The VIEWS table provides information about VIEWS in the database. You must have the show views permission. Otherwise, you cannot view information.
TRIGGERS table
--- The TRIGGERS table provides information about the trigger program. You must have the super permission to view the table.
In addition, new tables will be added in future versions.

[Note]Information_schema is a database composed of database metadata. It stores basic information about the mysql database. And change at any time. Used to view information and make system decisions as an important information provider.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.