Description of permissions related to the information_schema database in MySQL

1. Introduction to information_schema

The information_schema database was created after MySQL version 5.0, a virtual database that does not physically exist, they are actually views . We can check that the data exists in the following directory and cannot see the information_schema folder :



It can be seen that the information_schema database does not exist . The information_schema database is similar to the "data dictionary", which provides a way to access database metadata, that is, data of data, such as database name or table name, column type, access rights (more refined access methods), and changes at any time. It is used as an important information provider when viewing information and making system decisions.

Second, the information_schema database in MySQL has the following characteristics

1. Even if it is a newly created user, that is to say, this user has only one usage permission. It can all view part of the table in informatoin_schema.

For a user with all privileges removed, access to the information_schema database



2. An error occurs when trying to authorize the information_schema permission to the user


 

3. How to make the information_schema database invisible to ordinary people

It is being solved, and will be added later. If you have any expert knowledge, please enlighten me.

4. Important tables in the information_schema database

SCHEMATA table
---SCHEMATA table provides information about all databases in the current mysql instance. This table is taken from the result of show databases.
TABLES table
--- TABLES table provides information (including views) about the tables in the database. Describes in detail which schema a table belongs to, table type, table engine, creation time, and so on. This table is taken from the result of show tables from schemaname.
COLUMNS table
---COLUMNS table provides column information in the table. Describes all the columns of a table and the information about each column in detail. This table is taken from the result of show columns from schemaname.tablename.
STATISTICS table
---STATISTICS table provides information about table indexes. This table is taken from the result of show index from schemaname.tablename.
USER_PRIVILEGES table
---USER_PRIVILEGES (user authority) table gives information about the full authority. This information is derived from the mysql.user grant table. is a non-standard table.
SCHEMA_PRIVILEGES table
---SCHEMA_PRIVILEGES (schema privileges) table gives information about scheme (database) privileges. This information comes from the mysql.db grant table. is a non-standard table.
TABLE_PRIVILEGES table
--- TABLE_PRIVILEGES (table privileges) table gives information about table privileges. This information is derived from the mysql.tables_priv grant table. is a non-standard table.
COLUMN_PRIVILEGES table
---COLUMN_PRIVILEGES(列权限)表给出了关于列权限的信息。该信息源自mysql.columns_priv授权表。是非标准表。
CHARACTER_SETS表
---CHARACTER_SETS(字符集)表提供了mysql实例可用字符集的信息。是SHOW CHARACTER SET结果集取之此表。
COLLATIONS表
---COLLATIONS表提供了关于各字符集的对照信息。
COLLATION_CHARACTER_SET_APPLICABILITY表
---COLLATION_CHARACTER_SET_APPLICABILITY表指明了可用于校对的字符集。这些列等效于SHOW COLLATION的前两个显示字段。
TABLE_CONSTRAINTS表
---TABLE_CONSTRAINTS表描述了存在约束的表。以及表的约束类型。
KEY_COLUMN_USAGE表
---KEY_COLUMN_USAGE表描述了具有约束的键列。
ROUTINES表
---ROUTINES表提供了关于存储子程序(存储程序和函数)的信息。此时,ROUTINES表不包含自定义函数(UDF)。名为“mysql.proc name”的列指明了对应于INFORMATION_SCHEMA.ROUTINES表的mysql.proc表列。
VIEWS表
---VIEWS表给出了关于数据库中的视图的信息。需要有show views权限,否则无法查看视图信息。
TRIGGERS表
---TRIGGERS table provides information on triggering procedures. You must have super permission to view this table.
Also, new tables will be added in future releases.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326313457&siteId=291194637