What is the information_schema database of MySQL and its role?

Source: Internet
Author: User
Tags wordpress blog

When you install or use MySQL, you will find that there is an information_schema database besides the database you have installed. What is the use of the information_schema database? If you use a Wordpress blog, you may wonder if you want to install the database added by the template? Watch this filmArticleThen you will understand information_schema database.

The information_schema database comes with MySQL, which provides a way to access database metadata. What is metadata? Metadata is data about data, such as database name or table name, column data type, or access permission. In some cases, other terms used to express this information include "Data Dictionary" and "system directory ".
In MySQL, information_schema is regarded as a database, specifically an information database. Information about all other databases maintained by the MySQL server is saved. Such as the database name, database table, and data type and access permissions in the table column. There are several read-only tables in information_schema. They are actually views rather than basic tables, so you won't be able to see any files related to them.

Information_schema database table description:

Schemata table: Provides information about all databases in the current MySQL instance. Is the result of show databases.

Tables Table: Provides information about tables in the database (including views ). Describes in detail the schema, table type, table engine, and creation time of a table. Is the result of show tables from schemaname.

Columns table:Provides 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: Provides information about table indexes. Is the result of show index from schemaname. tablename.

User_privileges(User permission) Table: Provides information about full-process permissions. This information is from the mysql. user authorization table. Non-standard table.

Schema_privileges(Scheme permission) Table: provides information about the scheme (database) permission. This information is from the mysql. DB authorization table. Non-standard table.

Table_privileges(Table permission) Table: Provides information about table permissions. This information is from the mysql. tables_priv authorization table. Non-standard table.

Column_privileges(Column permission) Table: provides information about the column permission. This information is derived from the mysql. columns_priv authorization table. Non-standard table.

Character_sets(Character set) Table: Provides information about available character sets for MySQL instances. This table is obtained from the show Character Set result set.

Collations table:Provides control information about each character set.

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:Describes tables with constraints. And the constraint type of the table.

Key_column_usage table:Describes the restricted key columns.

Routines table:ProvidesProgram(Storage program and function) information. 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 view information about the database is provided. You must have the show views permission. Otherwise, you cannot view information.

Triggers table:Provides information about the trigger program. You must have the super permission to view the table.

Article from:Xiaofeng caotangHttp://www.cnitman.com/mysql-information_schema-explain/

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.