MySQL5.6 own library of 4 Comments

1.information_schema Details:

  information_schema MySQL database is built, which provides access to database metadata. What is metadata it? Metadata is data about data, such as name or database table name, column data type, or access permissions. Other terms sometimes used to describe the information includes "data dictionary" and "system directory." In MySQL, the information_schema seen as a database, to be exact information database. Which holds all the information about the MySQL server maintained by other databases. Such as database name, table, table column data types with access to the database and so on. In the INFORMATION_SCHEMA, there are several read-only table. They are actually views, not base tables, so you will not see any files associated with it. information_schema database table shows:

    SCHEMATA table: mysql provides information about the current instance for all databases. The results show databases is taken from the table. TABLES Table: provides information about the database tables (including views). A detailed presentation of the table belongs to which schema, table type, table engine, creation time and other information. The results show tables from schemaname is taken from the table.

    COLUMNS Table: Provides column information table. Detailed presentation of all information for each column and row of a particular table. The results show columns from schemaname.tablename is taken from the table.

    STATISTICS Table: provides information about table indexes. The results show index from schemaname.tablename is taken from the table.

    USER_PRIVILEGES (user rights) Table: gives information about the full privileges. This information is derived from mysql.user authorization form. Non-standard table.

    SCHEMA_PRIVILEGES (program rights) Table: gives information about the program (database) privileges. This information comes from mysql.db authorization form. Non-standard table.

    TABLE_PRIVILEGES (Table privilege) Table: gives information about table privileges. This information is derived from mysql.tables_priv authorization form. Non-standard table.

    COLUMN_PRIVILEGES (column privileges) Table: gives information about the column permissions. This information is derived from mysql.columns_priv authorization form. Non-standard table.

    CHARACTER_SETS (characters) Table: Examples of useful mysql provides information character sets. SHOW CHARACTER SET is set to take the result of the table.

    COLLATIONS Table: Provides information about each control character set.

    COLLATION_CHARACTER_SET_APPLICABILITY Table: indicates a character set for proofing. The first two columns display field equivalent to the SHOW COLLATION.

    TABLE_CONSTRAINTS table: table describes the existence of constraints. As well as table constraint types.

    KEY_COLUMN_USAGE Table: describes the key column with constraints.

    ROUTINES table: provides information about stored routines (stored procedures and functions). At this time, ROUTINES table does not include the custom function (UDF). Column named "mysql.proc name" indicates the corresponding table columns mysql.proc INFORMATION_SCHEMA.ROUTINES table.

    VIEWS Table: gives information about the database view. Show views need to have permission to view or not view information.

    TRIGGERS Table: provides information about the trigger program. Super must have permission to view the table

2. mysql role description:

  mysql: mysql This is the core database, similar to sql server in the master table, control and management information the user is responsible for the database is stored, permission settings, keywords, and so they need to use mysql. You can not be deleted, if mysql is not very understanding, and do not easily modify the database information table inside.

3. performance_schema role description:

   mysql 5.5 version adds a performance optimization engine: PERFORMANCE_SCHEMA This feature is off by default: you need to set the parameters: performance_schema can start this function, the parameters are static and can only write in my.ini can not be dynamically modified. Take a look at something it:

    mysql> use performance_schema;

    Database changed

    mysql> show tables ;

    +----------------------------------------------+

    | Tables_in_performance_schema |

    +----------------------------------------------+

    | cond_instances |

    | events_waits_current |

    | events_waits_history |

    | events_waits_history_long |

    | events_waits_summary_by_instance |

    | events_waits_summary_by_thread_by_event_name |

    | events_waits_summary_global_by_event_name |

    | file_instances | | file_summary_by_event_name |

    | file_summary_by_instance |

    | mutex_instances |

    | performance_timers |

    | rwlock_instances |

    | setup_consumers |

    | setup_instruments |

    | setup_timers |

    | threads |

    +----------------------------------------------+

    17 rows in set (0.00 sec)

    Here data table is divided into several categories:

      1) setup table: Table settings, configure monitoring options.

      2) current events table: Record the current thread that is what happened.

      3) history table various events occurring history table

      4) summary table statistics for various events

      5) Miscellaneous table, table mess.

    setup 表:

      mysql> SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES -> WHERE TABLE_SCHEMA = 'performance_schema' -> AND TABLE_NAME LIKE 'setup%';

      +-------------------+

      | TABLE_NAME |

      +-------------------+

      | setup_consumers |

      | setup_instruments |

      | setup_timers |

      +-------------------+

      setup_consumers describe various events setup_instruments description under the name of the database and whether the monitor is turned on. setup_timers monitoring options have been described time interval sampling frequency

4. test action Introduction:

  This is the time to install a test database was created, and its name, is a completely empty database, there is no table can be removed.

Guess you like

Origin www.cnblogs.com/liangxiaoji/p/11373073.html