MySQL Information database: information_schema

Source: Internet
Author: User

1. Information_schema
INFORMATION_SCHEMA is the MySQL information database.

The library is able to view MySQL database, table below. permissions, and other information.

This library is generated by default in the database. Information_schema is actually a view, not a real table.

The MySQL terminal is able to view all databases.
mysql> show databases;

2. Included tables
View the tables included below
mysql> use Information_schema;    Database changedmysql> Show tables;

3. schemata
Information that includes all databases
SELECT * from Schemata;
All database information is listed. Databases with show;
4. TABLES
The Information_schema.tables table is used to hold information about all tables in the database.
     Table_schema: Database name     table_name: Table name     table_type:base tables as base data table, view         engine: Storage engine InnoDB        VERSION :     row_format:compact     table_rows: Table row number, for InnoDB table. In SQL optimization. The row count is only approximate estimate. Avg_row_length: Average length    data_length: Data storage size max_data_length:0   index_length: Index size      data_free:innodb table showing free space Auto_increment: Self-growth ID    create_time: Creation time Table_collation: Proofing Character Set Gbk_chinese_ci
Querying the size of a table's space consumption
Select Concat (Round (((index_length+data_length)/1024/1024), 2), ' MB ') as DATA from TABLES where table_schema= ' my_db ' and Table_name= ' my_table ';
Represents the size of the my_db.my_table table that occupies the index and the sum of data.
5. COLUMNS
The Columns table includes field information from all databases. Including fields of database, table, proofing code, permissions and other information
6. TRIGGERS
Information about the MySQL trigger program.


Address: http://blog.csdn.net/yonggang7/article/details/24527069

MySQL Information database: information_schema

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.