Server 层混杂信息字典表 | 全方位认识 information_schema

在上一篇《Server层表级别对象字典表 | 全方位认识 information_schema》中,我们详细介绍了information_schema系统库的表级别对象字典表,本期我们将为大家带来系列第四篇《Server层混杂信息字典表 | 全方位认识 information_schema》,下面请跟随我们一起开始information_schema系统库的系统学习之旅吧。

作者 罗小波·沃趣科技高级数据库技术专家
出品 沃趣科技

在上一篇《Server层表级别对象字典表 | 全方位认识 information_schema》中,我们详细介绍了information_schema系统库的表级别对象字典表,本期我们将为大家带来系列第四篇《Server层混杂信息字典表 | 全方位认识 information_schema》,下面请跟随我们一起开始information_schema系统库的系统学习之旅吧。

1. GLOBAL_STATUS、GLOBAL_VARIABLES、SESSION_STATUS、SESSION_VARIABLES

GLOBAL_STATUS表提供查询具备全局级别的状态变量值,该表中的值对应着show global status;语句的输出信息

SESSION_STATUS表提供查询会话级别的状态变量值(如果某个状态变量不具备会话级别,则显示全局级别变量值),该表中的值对应着show session status;或show status;语句的输出信息

GLOBAL_VARIABLES表提供具备全局级别的系统变量值,该表中对应着show global variables;语句的输出信息

SESSION_VARIABLES表提供会话级别的系统变量值(如果某个系统变量不具备会话级别,则显示全局级别变量值),该表中的值对应着show session variables;或show variables;语句的输出信息

PS:

  • 从MySQL 5.7.6版本起,information_schema.global_status表中是否记录数据依赖于系统变量show_compatibility_56如何设置,如果设置为OFF,则记录内容迁移到performance_schema.global_status表中,information_schema.global_status表不再记录

  • 这些表为Memory引擎临时表

下面是该表中存储的信息内容

# GLOBAL_STATUS表
root@localhost Wed Jan 24 00:12:23 2018 00:12:23 [(none)]>select * from information_schema.global_status limit 2;
+------------------+----------------+
| VARIABLE_NAME    | VARIABLE_VALUE |
+------------------+----------------+
| ABORTED_CLIENTS  | 1              |
| ABORTED_CONNECTS | 0              |
+------------------+----------------+
2 rows in set (0.00 sec)

# SESSION_STATUS表
root@localhost Wed Jan 24 00:25:59 2018 00:25:59 [(none)]>select * from information_schema.session_status limit 2;
+------------------+----------------+
| VARIABLE_NAME    | VARIABLE_VALUE |
+------------------+----------------+
| ABORTED_CLIENTS  | 2              |
| ABORTED_CONNECTS | 0              |
+------------------+----------------+
2 rows in set (0.00 sec)

# GLOBAL_VARIABLES表
root@localhost Wed Jan 24 00:25:56 2018 00:25:56 [(none)]>select * from information_schema.global_variables limit 2;
+-------------------------+----------------+
| VARIABLE_NAME          | VARIABLE_VALUE |
+-------------------------+----------------+
| MAX_PREPARED_STMT_COUNT | 16382          |
| OPTIMIZER_PRUNE_LEVEL  | 1              |
+-------------------------+----------------+
2 rows in set (0.00 sec)

# SESSION_VARIABLES表
root@localhost Wed Jan 24 00:26:22 2018 00:26:22 [(none)]>select * from information_schema.session_variables limit 2;
+-------------------------+----------------+
| VARIABLE_NAME          | VARIABLE_VALUE |
+-------------------------+----------------+
| MAX_PREPARED_STMT_COUNT | 16382          |
| OPTIMIZER_PRUNE_LEVEL  | 1              |
+-------------------------+----------------+
2 rows in set (0.00 sec)

字段含义如下:

  • VARIABLE_NAME:全局状态变量名称

  • VARIABLE_VALUE:全局状态变量统计值

对于系统变量,查询的方式还可以使用 "select语句+@@variable_name" 的方式,如下:

# 查询全局级别系统变量
select @@global.optimizer_switch;

# 查询会话级别系统变量
select @@session.optimizer_switch;
select @@optimizer_switch;

2. OPTIMIZER_TRACE

该表提供优化程序跟踪功能产生的信息。 跟踪功能默认关闭,使用optimizer_trace系统变量启用跟踪功能

  • 如果开启该功能,则每个会话只能跟踪他自己执行的语句,不能看到其他会话执行的语句,且每个会话只能记录最后一个跟踪的SQL语句

  • 该表为InnoDB引擎临时表

下面是该表中存储的信息内容

# 启用trace功能
root@localhost : (none) 11:45:21> SET optimizer_trace="enabled=on";
Query OK, 0 rows affected (0.00 sec)

# 执行查询语句
root@localhost : (none) 11:55:02> select * from sbtest.sbtest1 where id=1;
+----+---------+-------------------------------------------------------------------------------------------------------------------------+-----+
| id | k      | c                                                                                                                      | pad |
+----+---------+-------------------------------------------------------------------------------------------------------------------------+-----+
|  1 | 2493947 | 44401167605-95921109806-49205991371-78375263823-83309869774-25157184837-97554765438-15989585205-62089403228-04207686848 | xxx |
+----+---------+-------------------------------------------------------------------------------------------------------------------------+-----+
1 row in set (0.00 sec)

# 查询 INFORMATION_SCHEMA.OPTIMIZER_TRACE表
root@localhost : (none) 11:57:28> SELECT * FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE\G;
*************************** 1. row ***************************
                        QUERY: select * from sbtest.sbtest1 where id=1
                        TRACE: {
"steps": [
{
  "join_preparation": {
    "select#": 1,
    "steps": [
      {
        "expanded_query": "/* select#1 */ select `sbtest`.`sbtest1`.`id` AS `id`,`sbtest`.`sbtest1`.`k` AS `k`,`sbtest`.`sbtest1`.`c` AS `c`,`sbtest`.`sbtest1`.`pad` AS `pad` from `sbtest`.`sbtest1` where (`sbtest`.`sbtest1`.`id` = 1)"
......
  "join_optimization": {
    "select#": 1,
    "steps": [
      {
        "condition_processing": {
          "condition": "WHERE",
          "original_condition": "(`sbtest`.`sbtest1`.`id` = 1)",
          "steps": [
            {
              "transformation": "equality_propagation",
              "resulting_condition": "multiple equal(1, `sbtest`.`sbtest1`.`id`)"
            },
            {
              "transformation": "constant_propagation",
              "resulting_condition": "multiple equal(1, `sbtest`.`sbtest1`.`id`)"
            },
            {
              "transformation": "trivial_condition_removal",
              "resulting_condition": "multiple equal(1, `sbtest`.`sbtest1`.`id`)"
......
        "substitute_generated_columns": {
......
        "table_dependencies": [
          {
            "table": "`sbtest`.`sbtest1`",
            "row_may_be_null": false,
            "map_bit": 0,
            "depends_on_map_bits": [
......
        "ref_optimizer_key_uses": [
          {
            "table": "`sbtest`.`sbtest1`",
            "field": "id",
            "equals": "1",
            "null_rejecting": false
......
        "rows_estimation": [  # 通常, 我们需要特别留意这一段信息中的rows和cost的数值,代表着语句扫描的数据行数和成本开销
          {
            "table": "`sbtest`.`sbtest1`",
            "rows": 1,
            "cost": 1,
            "table_type": "const",
            "empty": false
......
        "condition_on_constant_tables": "1",
        "condition_value": true
      },
      {
        "attaching_conditions_to_tables": {
          "original_condition": "1",
          "attached_conditions_computation": [
          ],
          "attached_conditions_summary": [
......
        "refine_plan": [
......
  "join_execution": {
    "select#": 1,
    "steps": [
......
MISSING_BYTES_BEYOND_MAX_MEM_SIZE: 0
      INSUFFICIENT_PRIVILEGES: 0
1 row in set (0.00 sec)

# 使用完trace功能之后,记得关闭。关闭之后该表中仍然会记录着关闭之前的最后一条跟踪记录
root@localhost : (none) 11:57:40> SET optimizer_trace="enabled=off";
Query OK, 0 rows affected (0.00 sec)

字段含义如下:

  • QUERY:被跟踪的SQL语句文本

  • TRACE:JSON格式的跟踪信息

  • MISSING_BYTES_BEYOND_MAX_MEM_SIZE:optimizer_trace_max_mem_size系统变量(默认16384字节)设置跟踪SQL语句时用于存放跟踪信息的内存总量限制,当跟踪的信息超过了该变量设置的值时,则将会被截断(记录不完整),在OPTIMIZER_TRACE表中的MISSING_BYTES_BEYOND_MAX_MEM_SIZE字段用于记录被截断的字节数

  • INSUFFICIENT_PRIVILEGES:被跟踪的SQL如果是带有"SQL SECURITY DEFINER"语句的视图或存储过程时,可能会因为跟踪该SQL的会话对应的用户缺少执行权限而被拒绝执行该SQL, 在这种情况下,跟踪信息为空,在OPTIMIZER_TRACE表中的INSUFFICIENT_PRIVILEGES列将显示数字“1”

3. PLUGINS

该表提供查询关于MySQL Server中支持哪些插件的信息

  • 该表为InnoDB引擎临时表

下面是该表中存储的信息内容

admin@localhost : information_schema 06:06:32> select * from PLUGINS limit 1\G;
*************************** 1. row ***************************
      PLUGIN_NAME: binlog
    PLUGIN_VERSION: 1.0
    PLUGIN_STATUS: ACTIVE
      PLUGIN_TYPE: STORAGE ENGINE
PLUGIN_TYPE_VERSION: 50718.0
    PLUGIN_LIBRARY: NULL
PLUGIN_LIBRARY_VERSION: NULL
    PLUGIN_AUTHOR: MySQL AB
PLUGIN_DESCRIPTION: This is a pseudo storage engine to represent the binlog in a transaction
    PLUGIN_LICENSE: GPL
      LOAD_OPTION: FORCE
1 rows in set (0.00 sec)

字段含义如下(该表中所有字段都为 "MySQL extension" 列)

  • PLUGIN_NAME:插件名称,该名称可被用于:install plugin和uninstall plugin语句执行插件安装和卸载(plugin_name)

  • PLUGIN_VERSION:插件通用类型描述符的版本

  • PLUGIN_STATUS:插件状态,有效值为:ACTIVE、INACTIVE、DISABLED、DELETED

  • PLUGIN_TYPE:插件类型,有效值为:STORAGE ENGINE、INFORMATION_SCHEMA、AUTHENTICATION.

  • PLUGIN_TYPE_VERSION:插件类型描述符的版本

  • PLUGIN_LIBRARY:插件的共享库文件的名称。该名称可被用于INSTALL PLUGIN和UNINSTALL PLUGIN等语句执行安装与卸载插(soname)件。该文件位于plugin_dir系统变量指定的目录中。如果插件库名称为NULL,则表示该插件是被编译到发行版本中默认支持的,且不能使用UNINSTALL语句卸载该插件

  • PLUGIN_LIBRARY_VERSION:插件API接口版本

  • PLUGIN_AUTHOR:认证插件的名称

  • PLUGIN_DESCRIPTION:关于插件的间简短描述信息

  • PLUGIN_LICENSE:表示插件许可方式,例如:GPL

  • LOAD_OPTION:表示如何加载插件,有效值为:OFF、ON、FORCE、FORCE_PLUS_PERMANENT

PS:该表中的信息也可以使用show语句查询(但该语句能查询的信息非常有限),如下:

root@localhost : information_schema 02:10:36> SHOW PLUGINS;
+----------------------------+----------+--------------------+---------+---------+
| Name                      | Status  | Type              | Library | License |
+----------------------------+----------+--------------------+---------+---------+
| binlog                    | ACTIVE  | STORAGE ENGINE    | NULL    | GPL    |
| mysql_native_password      | ACTIVE  | AUTHENTICATION    | NULL    | GPL    |
| sha256_password            | ACTIVE  | AUTHENTICATION    | NULL    | GPL    |
......
44 rows in set (0.00 sec)

4. PROCESSLIST

该表提供查询一些关于线程运行过程中的状态信息

  • 与SHOW processlist;语句输出信息一样,如果你没有process权限,则只能看到你自己的线程信息,如果有super权限,则可以看到所有其他用户的线程信息,如果是匿名用户,则不能看到任何线程信息

  • INFORMATION_SCHEMA.PROCESSLIST表中只记录线程当前正在执行的语句信息,一旦语句执行完成,或者是多语句的事务中,先执行完成的语句,在该表中是无法查看到的

  • processlist信息也可从perform_schema.threads表中获取。并且查询该表中的线程信息不需要互斥体,对服务器性能的影响最小(查询INFORMATION_SCHEMA.PROCESSLIST和SHOW PROCESSLIST语句需要互斥体,因此会一定程度上影响性能),该表中还包含后台线程的信息(INFORMATION_SCHEMA.PROCESSLIST和SHOW PROCESSLIST不显示后台线程信息)。threads表能够获取渠道不能获取的信息,也就意味着可以用该表中的信息来监听其他所有线程的活动情况

  • 该表为InnoDB引擎临时表

  • PS:

    • SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST和SHOW FULL PROCESSLIST两个语句查询的结果集完全相同
    • 另外还可以使用mysqladmin processlist命令查看线程信息
    • 在使用show命令查看线程信息时,如果你不使用show full子句,则info列只会显示语句的前100个字节字符串
    • 在尝试连接MySQL时报"too many connections"时,可以使用带有super权限的用户(前提是你没有把super权限分配给管理员之外的其他用户)连接到MySQL中,使用这些语句查看是什么用户或者主机占用了过多的连接数
    • 线程信息中的ID列,可以用kill语句杀死(但需要用户具有super权限),kill query id;只杀死该线程正在执行的查询语句,kill id;可以把该线程的会话连接杀死,当kill一个线程或者一个查询时,会释放掉占用的资源并回滚正在执行的操作(例如:删除临时表,释放锁,回滚DML事务操作等,但不支持事务的DML语句除外),所以根据具体执行的语句不同kill掉一个连接或者查询的时间开销不同。详见链接:https://dev.mysql.com/doc/refman/5.7/en/kill.html

下面是该表中存储的信息内容

admin@localhost : information_schema 06:06:57> select * from PROCESSLIST;
+----+-------+-------------------+--------------------+------------------+-------+---------------------------------------------------------------+---------------------------+
| ID | USER  | HOST              | DB                | COMMAND          | TIME  | STATE                                                        | INFO                      |
+----+-------+-------------------+--------------------+------------------+-------+---------------------------------------------------------------+---------------------------+
|  4 | admin | localhost        | information_schema | Query            |    0 | executing                                                    | select * from PROCESSLIST |
|  9 | admin | localhost        | performance_schema | Sleep            |  8900 |                                                              | NULL                      |
|  3 | qfsys | 10.10.20.15:60481 | NULL              | Binlog Dump GTID | 34076 | Master has sent all binlog to slave; waiting for more updates | NULL                      |
+----+-------+-------------------+--------------------+------------------+-------+---------------------------------------------------------------+---------------------------+
3 rows in set (0.00 sec)

表字段含义(该表中所有字段都为 "MySQL extension" 列)

  • ID:连接进程标识符。这与在INFORMATION_SCHEMA.PROCESSLIST表的ID列,performance_schema.threads表的PROCESSLIST_ID列中显示的值是相同的值,都是由CONNECTION_ID()函数返回的值

  • USER:执行语句的MySQL用户名称。如果显示的是“system user”,它指的是由服务器生成的非客户端线程正在执行内部任务。例如主备复制中从库上使用的I/O或SQL线程或延迟行处理程序的线程。“unauthenticated user”指的是已经建立客户端连接但是还没有对客户端连接的用户进行客户端用户的认证的线程。 “event_scheduler”是指监视计划任务调度事件的线程。对于“system user”,在Host列中显示为Null值

  • HOST:执行语句的客户端的主机名(除了没有主机信息的“system user”之外)。 SHOW PROCESSLIST的Host列以host_name:client_port格式显示TCP/IP连接的主机名,以便更容易确定哪个客户端正在做什么事情

  • DB:客户端连接的默认数据库(如果连接时指定了库名),否则显示为NULL值

  • COMMAND:线程正在执行的命令的类型。此列的值对应于C/S协议和Com_xxx状态变量的COM_xxx命令。

  • TIME:线程处于当前状态的时间数(以秒为单位)。对于从库SQL线程,该值是最后复制事件的时间戳和从库的实际时间之间的秒数(也可以理解为事件等待的时间)

  • STATE:提示线程正在做什么样的操作,事件或状态。大多数状态所对应于的操作都执行的非常快。如果线程停留在某个状态很长时间,则表名该线程可能执行过程中碰到了某个问题,需要进行排查。对于SHOW PROCESSLIST语句,State列的值始终为NULL

  • INFO:线程正在执行的语句,如果没有执行任何语句,则显示为NULL。语句可以是发送到服务器的语句,或者如果语句内部调用执行其他语句,即指的最内层调用的语句。例如,如果CALL语句调用存储过程,而存储过程中执行SELECT语句,则Info值将显示存储过程中的SELECT语句

    PS:该表中的信息还可以使用show [full] processlist;语句查看

root@localhost : information_schema 02:30:15> show full processlist\G;
*************************** 1. row ***************************
Id: 4
User: qfsys
Host: 192.168.2.120:48489
db: NULL
Command: Binlog Dump
Time: 15548
State: Master has sent all binlog to slave; waiting for more updates
Info: NULL
............
2 rows in set (0.00 sec)

5、PROFILING

该表提供查询关于语句性能分析的信息。其记录内容对应于SHOW PROFILES和SHOW PROFILE语句产生的信息

  • 该表需要在会话变量 profiling=1时才会记录语句性能分析信息,否则该表不记录

  • 该表为Memory引擎临时表,注意:从MySQL 5.7.2开始,此表不再推荐使用,在未来的MySQL版本中删除。改用Performance Schema;代替

下面是该表中存储的信息内容

root@localhost : sbtest 04:47:17> set profiling=1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

root@localhost : (none) 04:47:10> use sbtest
Database changed

root@localhost : sbtest 04:47:21> select min(id) from sbtest1;
+---------+
| min(id) |
+---------+
|      1 |
+---------+
1 row in set (0.00 sec)

root@localhost : sbtest 04:47:33> select * from information_schema.profiling;
+----------+-----+----------------------+----------+----------+------------+-------------------+---------------------+--------------+---------------+---------------+-------------------+-------------------+-------------------+-------+-----------------------+----------------------+-------------+
| QUERY_ID | SEQ | STATE                | DURATION | CPU_USER | CPU_SYSTEM | CONTEXT_VOLUNTARY | CONTEXT_INVOLUNTARY | BLOCK_OPS_IN | BLOCK_OPS_OUT | MESSAGES_SENT | MESSAGES_RECEIVED | PAGE_FAULTS_MAJOR | PAGE_FAULTS_MINOR | SWAPS | SOURCE_FUNCTION      | SOURCE_FILE          | SOURCE_LINE |
+----------+-----+----------------------+----------+----------+------------+-------------------+---------------------+--------------+---------------+---------------+-------------------+-------------------+-------------------+-------+-----------------------+----------------------+-------------+
|        2 |  2 | starting            | 0.000107 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | NULL                  | NULL                |        NULL |
|        2 |  3 | checking permissions | 0.000022 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | check_access          | sql_authorization.cc |        810 |
|        2 |  4 | Opening tables      | 0.000080 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | open_tables          | sql_base.cc          |        5650 |
|        2 |  5 | init                | 0.000056 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | handle_query          | sql_select.cc        |        121 |
|        2 |  6 | System lock          | 0.000021 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | mysql_lock_tables    | lock.cc              |        323 |
|        2 |  7 | optimizing          | 0.000057 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | optimize              | sql_optimizer.cc    |        151 |
|        2 |  8 | executing            | 0.000007 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | exec                  | sql_executor.cc      |        119 |
|        2 |  9 | end                  | 0.000003 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | handle_query          | sql_select.cc        |        199 |
|        2 |  10 | query end            | 0.000023 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | mysql_execute_command | sql_parse.cc        |        4968 |
|        2 |  11 | closing tables      | 0.000016 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | mysql_execute_command | sql_parse.cc        |        5020 |
|        2 |  12 | freeing items        | 0.000012 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | mysql_parse          | sql_parse.cc        |        5596 |
|        2 |  13 | cleaning up          | 0.000008 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | dispatch_command      | sql_parse.cc        |        1902 |
+----------+-----+----------------------+----------+----------+------------+-------------------+---------------------+--------------+---------------+---------------+-------------------+-------------------+-------------------+-------+-----------------------+----------------------+-------------+
17 rows in set, 1 warning (0.00 sec)

字段含义如下:

  • QUERY_ID:执行的语句的数字标识符

  • SEQ:一个序列号,用于表示具有相同QUERY_ID值的语句记录行的显示顺序,

  • STATE:表示语句性能分析的状态(语句阶段)

  • DURATION:表示语句在性能分析中的某个给定状态下持续的时长(单位为秒)

  • CPU_USER和CPU_SYSTEM:表示用户CPU的us%和sy%的时间开销(单位为秒)

  • CONTEXT_VOLUNTARY和CONTEXT_INVOLUNTARY:表示发生了多少次自主或非自主的上下文切换

  • BLOCK_OPS_IN和BLOCK_OPS_OUT:表示块输入和输出的操作数量

  • MESSAGES_SENT和MESSAGES_RECEIVED:表示发送和接收的通信消息的数量

  • PAGE_FAULTS_MAJOR和PAGE_FAULTS_MINOR:表示主要和次要页面错误的数量

  • SWAPS:表示发生了多少次swap

  • SOURCE_FUNCTION、SOURCE_FILE和SOURCE_LINE:提供关于在源代码中执行的性能状态和位置信息

该表中的信息还可以使用show语句查询,如下:

# 需要使用set profiling=1;语句开启,该功能即将废弃,使用performance_schema中的阶段事件代替
## 启用
root@localhost : information_schema 02:30:20> set profiling=1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

## 列出查询语句的query id和语句文本等信息
root@localhost : sbtest 04:33:47> show profiles;
+----------+------------+-----------------------------+
| Query_ID | Duration  | Query                      |
+----------+------------+-----------------------------+
|        1 | 0.00005125 | show warnings              |
|        2 | 0.00073950 | select * from profiling    |
|        3 | 0.00007150 | show warnings              |
|        4 | 0.00021025 | set profiling=1            |
|        5 | 0.00003250 | show warnings              |
|        6 | 0.00038300 | select * from profiling    |
|        7 | 0.00003625 | show warnings              |
|        8 | 0.00018250 | SELECT DATABASE()          |
|        9 | 0.08272525 | select max(id) from sbtest1 |
+----------+------------+-----------------------------+
9 rows in set, 1 warning (0.00 sec)

## 找到query id为9,查询该ID的性能分析数据
root@localhost : sbtest 04:33:53> show profile all for query 9;
+----------------------+----------+----------+------------+-------------------+---------------------+--------------+---------------+---------------+-------------------+-------------------+-------------------+-------+-----------------------+----------------------+-------------+
| Status              | Duration | CPU_user | CPU_system | Context_voluntary | Context_involuntary | Block_ops_in | Block_ops_out | Messages_sent | Messages_received | Page_faults_major | Page_faults_minor | Swaps | Source_function      | Source_file          | Source_line |
+----------------------+----------+----------+------------+-------------------+---------------------+--------------+---------------+---------------+-------------------+-------------------+-------------------+-------+-----------------------+----------------------+-------------+
| starting            | 0.000089 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                1 |    0 | NULL                  | NULL                |        NULL |
| checking permissions | 0.000011 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | check_access          | sql_authorization.cc |        810 |
| Opening tables      | 0.082168 | 0.000000 |  0.081988 |                25 |                  2 |          128 |            0 |            0 |                0 |                0 |              800 |    0 | open_tables          | sql_base.cc          |        5650 |
| init                | 0.000173 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                10 |    0 | handle_query          | sql_select.cc        |        121 |
| System lock          | 0.000012 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | mysql_lock_tables    | lock.cc              |        323 |
| optimizing          | 0.000079 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                2 |    0 | optimize              | sql_optimizer.cc    |        151 |
| executing            | 0.000010 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | exec                  | sql_executor.cc      |        119 |
| end                  | 0.000003 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | handle_query          | sql_select.cc        |        199 |
| query end            | 0.000009 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | mysql_execute_command | sql_parse.cc        |        4968 |
| closing tables      | 0.000008 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | mysql_execute_command | sql_parse.cc        |        5020 |
| freeing items        | 0.000150 | 0.000000 |  0.000000 |                0 |                  1 |            0 |            0 |            0 |                0 |                0 |                3 |    0 | mysql_parse          | sql_parse.cc        |        5596 |
| cleaning up          | 0.000013 | 0.000000 |  0.000000 |                0 |                  0 |            0 |            0 |            0 |                0 |                0 |                0 |    0 | dispatch_command      | sql_parse.cc        |        1902 |
+----------------------+----------+----------+------------+-------------------+---------------------+--------------+---------------+---------------+-------------------+-------------------+-------------------+-------+-----------------------+----------------------+-------------+
12 rows in set, 1 warning (0.00 sec)

PS:关于show profiling语句,详见链接:https://dev.mysql.com/doc/refman/5.7/en/show-profile.html

6、CHARACTER_SETS

该表提供查询MySQL Server支持的可用字符集有哪些

  • 该表是Memory引擎临时表

下面是该表中存储的信息内容(MySQL 5.6版本支持40种字符集,5.7开始增加了gb18030 字符集)

admin@localhost : information_schema 03:31:08> select * from CHARACTER_SETS;
+--------------------+----------------------+---------------------------------+--------+
| CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION                    | MAXLEN |
+--------------------+----------------------+---------------------------------+--------+
............
| latin1            | latin1_swedish_ci    | cp1252 West European            |      1 |
| latin2            | latin2_general_ci    | ISO 8859-2 Central European    |      1 |
| swe7              | swe7_swedish_ci      | 7bit Swedish                    |      1 |
| ascii              | ascii_general_ci    | US ASCII                        |      1 |
............
| utf8              | utf8_general_ci      | UTF-8 Unicode                  |      3 |
............
| gb18030            | gb18030_chinese_ci  | China National Standard GB18030 |      4 |
+--------------------+----------------------+---------------------------------+--------+
41 rows in set (0.00 sec)

字段含义如下:

  • CHARACTER_SET_NAME:字符集名称

  • DEFAULT_COLLATE_NAME:字符集对应的默认校对规则

  • DESCRIPTION:字符集描述信息,该字段为 "MySQL extension" 列

  • MAXLEN:字符集单个字符占用的最大字节数,该字段为 "MySQL extension" 列

该表中的信息还可以使用show语句查询,如下:

root@localhost : (none) 12:02:04> SHOW CHARACTER SET like 'utf8%';
+---------+---------------+--------------------+--------+
| Charset | Description  | Default collation  | Maxlen |
+---------+---------------+--------------------+--------+
| utf8    | UTF-8 Unicode | utf8_general_ci    |      3 |
| utf8mb4 | UTF-8 Unicode | utf8mb4_general_ci |      4 |
+---------+---------------+--------------------+--------+
2 rows in set (0.00 sec)

7、COLLATIONS

该表提供查询MySQL Server支持的可用校对规则有哪些

  • 该表是Memory引擎临时表

下面是该表中存储的信息内容(MySQL 5.6版本共219种校对规则,MySQL 5.7版本共222种,MySQL 8.0共270种)

admin@localhost : information_schema 03:31:58> select * from COLLATIONS limit 20;
+-------------------+--------------------+----+------------+-------------+---------+
| COLLATION_NAME    | CHARACTER_SET_NAME | ID | IS_DEFAULT | IS_COMPILED | SORTLEN |
+-------------------+--------------------+----+------------+-------------+---------+
| big5_chinese_ci  | big5              |  1 | Yes        | Yes        |      1 |
| big5_bin          | big5              | 84 |            | Yes        |      1 |
............
| koi8r_bin        | koi8r              | 74 |            | Yes        |      1 |
+-------------------+--------------------+----+------------+-------------+---------+
20 rows in set (0.01 sec)

字段含义如下:

  • COLLATION_NAME:校对规则名称

  • CHARACTER_SET_NAME:校对规则对应的字符集名称,该字段为 "MySQL extension" 列

  • ID:校对规则的ID号,该字段为 "MySQL extension" 列

  • IS_DEFAULT:是否是字符集的默认校对规则,该字段为 "MySQL extension" 列

  • IS_COMPILED:校对规则是否被编译进Server中,如果不为Yes,则表示并没有被编译到Server中,校对规则处于不可用状态,该字段为 "MySQL extension" 列

  • SORTLEN:最大排序字节长度,与字符集对应的字符串在排序时所占用的内存大小有关,该字段为 "MySQL extension" 列

该表中的内容还可以使用show语句查询,如下:

root@localhost : information_schema 12:26:23> show collation where COLLATION='utf8_general_ci';
+-----------------+---------+----+---------+----------+---------+
| Collation      | Charset | Id | Default | Compiled | Sortlen |
+-----------------+---------+----+---------+----------+---------+
| utf8_general_ci | utf8    | 33 | Yes    | Yes      |      1 |
+-----------------+---------+----+---------+----------+---------+
1 row in set (0.00 sec)

8、COLLATION_CHARACTER_SET_APPLICABILITY

该表提供查询MySQL Server中哪种字符集适用于什么校对规则。查询结果集相当于从SHOW COLLATION获得的结果集中的前两个字段值。该表其实并没有太大作用

  • 该表是Memory引擎临时表

下面是该表中存储的信息内容

admin@localhost : information_schema 03:32:28> select * from COLLATION_CHARACTER_SET_APPLICABILITY limit 20;
+-------------------+--------------------+
| COLLATION_NAME    | CHARACTER_SET_NAME |
+-------------------+--------------------+
............
| latin1_swedish_ci | latin1            |
| latin1_danish_ci  | latin1            |
| latin1_german2_ci | latin1            |
| latin1_bin        | latin1            |
| latin1_general_ci | latin1            |
| latin1_general_cs | latin1            |
| latin1_spanish_ci | latin1            |
| latin2_czech_cs  | latin2            |
| latin2_general_ci | latin2            |
+-------------------+--------------------+
20 rows in set (0.00 sec)

字段含义如下:

  • COLLATION_NAME:校对规则名称

  • CHARACTER_SET_NAME:校对规则对应的字符集名称

9、COLUMN_PRIVILEGES

该表提供查询关于列(字段)的权限信息,表中的内容来自mysql.column_priv列权限表(需要针对一个表的列单独授权之后才会有内容)

  • 该表是Memory引擎临时表

下面是该表中存储的信息内容

# 针对某个用户授予某表某列的SELECT,INSERT,UPDATE权限
root@localhost : information_schema 09:37:43> grant select(id),insert(id),update(id) on sbtest.sbtest1 to xx@'%' identified by 'xx';
Query OK, 0 rows affected, 1 warning (0.00 sec)

# select语句方式查询该表中的权限信息
root@localhost : information_schema 09:38:32> select * from COLUMN_PRIVILEGES;
+----------+---------------+--------------+------------+-------------+----------------+--------------+
| GRANTEE  | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | PRIVILEGE_TYPE | IS_GRANTABLE |
+----------+---------------+--------------+------------+-------------+----------------+--------------+
| 'xx'@'%' | def          | sbtest      | sbtest1    | id          | SELECT        | NO          |
| 'xx'@'%' | def          | sbtest      | sbtest1    | id          | INSERT        | NO          |
| 'xx'@'%' | def          | sbtest      | sbtest1    | id          | UPDATE        | NO          |
+----------+---------------+--------------+------------+-------------+----------------+--------------+
3 rows in set (0.00 sec)

字段含义如下:

  • GRANTEE:PRIVILEGE_TYPE 列值的权限对应的授予者(账户名)

  • TABLE_CATALOG:该字段总是为def

  • TABLE_SCHEMA:PRIVILEGE_TYPE 列值的权限关联的表对应的库名

  • TABLE_NAME:PRIVILEGE_TYPE 列值的权限关联的表名

  • COLUMN_NAME:PRIVILEGE_TYPE 列值的权限关联的字段名

  • PRIVILEGE_TYPE:具体的列权限名称,注意:该字段值只显示一个权限名称,即,如果一个字段拥有多个可授予的列权限值,则在该表中会记录多行记录,每行PRIVILEGE_TYPE列值仅对应一个权限名称

  • IS_GRANTABLE:如果GRANTEE列值表示的授予者还同时拥有grant option权限,则该列值为YES,否则为NO

PS:该表中的信息还可以通过show语句方式查询(select和show方式虽然都能查询该表中的列权限信息,但是查询的结果展示方式有所不同)

# 语法
SHOW GRANTS;
SHOW GRANTS FOR CURRENT_USER;
SHOW GRANTS FOR CURRENT_USER();

# 示例
root@localhost : information_schema 09:39:10> show grants for 'xx'@'%';
+-------------------------------------------------------------------------------+
| Grants for xx@%                                                              |
+-------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'xx'@'%'                                                |
| GRANT SELECT (id), INSERT (id), UPDATE (id) ON `sbtest`.`sbtest1` TO 'xx'@'%' |
+-------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

10、SCHEMA_PRIVILEGES

该表提供查询关于库级别的权限信息,每种类型的库级别权限记录一行信息

  • 该表中的信息来自mysql.db表

  • 该表为Memory引擎临时表

下面是该表中存储的信息内容

# 创建一个库级别权限的帐号
root@localhost : information_schema 06:50:42> grant all on sbtest.* to test@'%' identified by 'test';
Query OK, 0 rows affected, 1 warning (0.01 sec)

# 查询这个帐号的库级别权限
root@localhost : information_schema 06:52:31>  select * from SCHEMA_PRIVILEGES where GRANTEE="'test'@'%'";
+------------+---------------+--------------+-------------------------+--------------+
| GRANTEE    | TABLE_CATALOG | TABLE_SCHEMA | PRIVILEGE_TYPE          | IS_GRANTABLE |
+------------+---------------+--------------+-------------------------+--------------+
| 'test'@'%' | def          | sbtest      | SELECT                  | NO          |
| 'test'@'%' | def          | sbtest      | INSERT                  | NO          |
| 'test'@'%' | def          | sbtest      | UPDATE                  | NO          |
| 'test'@'%' | def          | sbtest      | DELETE                  | NO          |
| 'test'@'%' | def          | sbtest      | CREATE                  | NO          |
| 'test'@'%' | def          | sbtest      | DROP                    | NO          |
| 'test'@'%' | def          | sbtest      | REFERENCES              | NO          |
| 'test'@'%' | def          | sbtest      | INDEX                  | NO          |
| 'test'@'%' | def          | sbtest      | ALTER                  | NO          |
| 'test'@'%' | def          | sbtest      | CREATE TEMPORARY TABLES | NO          |
| 'test'@'%' | def          | sbtest      | LOCK TABLES            | NO          |
| 'test'@'%' | def          | sbtest      | EXECUTE                | NO          |
| 'test'@'%' | def          | sbtest      | CREATE VIEW            | NO          |
| 'test'@'%' | def          | sbtest      | SHOW VIEW              | NO          |
| 'test'@'%' | def          | sbtest      | CREATE ROUTINE          | NO          |
| 'test'@'%' | def          | sbtest      | ALTER ROUTINE          | NO          |
| 'test'@'%' | def          | sbtest      | EVENT                  | NO          |
| 'test'@'%' | def          | sbtest      | TRIGGER                | NO          |
+------------+---------------+--------------+-------------------------+--------------+
18 rows in set (0.00 sec)

字段含义如下(该表中所有字段为 "MySQL extension" 列)

  • GRANTEE:表示权限对应的账户名称

  • TABLE_CATALOG:该字段总是为def

  • TABLE_SCHEMA:表示权限对应的数据库名称

  • PRIVILEGE_TYPE:表示权限列别,如:SELECT、TRIGGER等

  • IS_GRANTABLE:表示拥有该权限的账户是否可给其他人授予该权限,注意:只有帐号拥有grant option权限时才为YES,否则该字段为NO

PS:该表中记录的权限也可以通过show语句查询或者查询mysql.db表

# show语句查询
root@localhost : information_schema 06:53:19> show grants for test@'%';
+--------------------------------------------------+
| Grants for test@%                                |
+--------------------------------------------------+
| GRANT USAGE ON *.* TO 'test'@'%'                |
| GRANT ALL PRIVILEGES ON `sbtest`.* TO 'test'@'%' |
+--------------------------------------------------+
2 rows in set (0.00 sec)

# 查询mysql.db表
root@localhost : information_schema 06:52:37> select * from mysql.db where user='test'\G;
*************************** 1. row ***************************
            Host: %
              Db: sbtest
            User: test
      Select_priv: Y
      Insert_priv: Y
      Update_priv: Y
      Delete_priv: Y
      Create_priv: Y
        Drop_priv: Y
      Grant_priv: N
  References_priv: Y
      Index_priv: Y
      Alter_priv: Y
Create_tmp_table_priv: Y
Lock_tables_priv: Y
Create_view_priv: Y
  Show_view_priv: Y
Create_routine_priv: Y
Alter_routine_priv: Y
    Execute_priv: Y
      Event_priv: Y
    Trigger_priv: Y
1 row in set (0.00 sec)

11、TABLE_PRIVILEGES

该表提供查询关于表级别权限信息,该表中的内容来自mysql.tables_priv

  • 该表为Memory引擎临时表

下面是该表中存储的信息内容

# 创建测试帐号
root@localhost : information_schema 12:17:33> grant all on sbtest.sbtest1 to 'test_table'@'%' identified by 'test';
Query OK, 0 rows affected, 1 warning (0.00 sec)

# 查询该帐号的表级别权限
root@localhost : information_schema 12:18:20> select * from TABLE_PRIVILEGES where GRANTEE="'test_table'@'%'";
+------------------+---------------+--------------+------------+----------------+--------------+
| GRANTEE          | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | PRIVILEGE_TYPE | IS_GRANTABLE |
+------------------+---------------+--------------+------------+----------------+--------------+
| 'test_table'@'%' | def          | sbtest      | sbtest1    | SELECT        | NO          |
| 'test_table'@'%' | def          | sbtest      | sbtest1    | INSERT        | NO          |
| 'test_table'@'%' | def          | sbtest      | sbtest1    | UPDATE        | NO          |
| 'test_table'@'%' | def          | sbtest      | sbtest1    | DELETE        | NO          |
| 'test_table'@'%' | def          | sbtest      | sbtest1    | CREATE        | NO          |
| 'test_table'@'%' | def          | sbtest      | sbtest1    | DROP          | NO          |
| 'test_table'@'%' | def          | sbtest      | sbtest1    | REFERENCES    | NO          |
| 'test_table'@'%' | def          | sbtest      | sbtest1    | INDEX          | NO          |
| 'test_table'@'%' | def          | sbtest      | sbtest1    | ALTER          | NO          |
| 'test_table'@'%' | def          | sbtest      | sbtest1    | CREATE VIEW    | NO          |
| 'test_table'@'%' | def          | sbtest      | sbtest1    | SHOW VIEW      | NO          |
| 'test_table'@'%' | def          | sbtest      | sbtest1    | TRIGGER        | NO          |
+------------------+---------------+--------------+------------+----------------+--------------+
12 rows in set (0.00 sec)

表字段含义:

  • GRANTEE:权限拥有者,即账户名称

  • TABLE_CATALOG:该字段总是为def

  • TABLE_SCHEMA:表级别权限涉及的表所属的数据库名称

  • TABLE_NAME:表级别权限涉及的表名称

  • PRIVILEGE_TYPE:权限类型,有效值为:SELECT、INSERT、UPDATE、DELETE、CREATE、DROP、REFERENCES、ALTER、INDEX、CREATE VIEW、SHOW VIEW、TRIGGER

  • IS_GRANTABLE:拥有该权限的用户是否可以将此权限授予给其他人,注意:只有帐号拥有grant option权限时才为YES,否则该字段为NO

PS:该表中的内容还可以使用show语句和mysql.tables_priv表查看

# show语句
root@localhost : information_schema 12:19:14> show grants for test_table@'%';
+----------------------------------------------------------------+
| Grants for test_table@%                                        |
+----------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'test_table'@'%'                        |
| GRANT ALL PRIVILEGES ON `sbtest`.`sbtest1` TO 'test_table'@'%' |
+----------------------------------------------------------------+
2 rows in set (0.00 sec)

# mysql.tables_priv表
root@localhost : information_schema 12:21:01> select * from mysql.tables_priv where user='test_table'\G;
*************************** 1. row ***************************
  Host: %
    Db: sbtest
  User: test_table
Table_name: sbtest1
Grantor: root@localhost
Timestamp: 0000-00-00 00:00:00
Table_priv: Select,Insert,Update,Delete,Create,Drop,References,Index,Alter,Create View,Show view,Trigger
Column_priv: 
1 row in set (0.00 sec)

12、USER_PRIVILEGES

该表提供查询全局权限的信息,该表中的信息来自mysql.user表

  • 该表为Memory引擎临时表

下面是该表中存储的信息内容

# 创建测试帐号
root@localhost : information_schema 12:42:02> grant all on *.* to test_user@'%' identified by 'test';
Query OK, 0 rows affected, 1 warning (0.00 sec)

# 查看USER_PRIVILEGES 表
root@localhost : information_schema 12:44:59>  select * from USER_PRIVILEGES where GRANTEE="'test_user'@'%'";
+-----------------+---------------+-------------------------+--------------+
| GRANTEE        | TABLE_CATALOG | PRIVILEGE_TYPE          | IS_GRANTABLE |
+-----------------+---------------+-------------------------+--------------+
| 'test_user'@'%' | def          | SELECT                  | NO          |
| 'test_user'@'%' | def          | INSERT                  | NO          |
| 'test_user'@'%' | def          | UPDATE                  | NO          |
| 'test_user'@'%' | def          | DELETE                  | NO          |
| 'test_user'@'%' | def          | CREATE                  | NO          |
| 'test_user'@'%' | def          | DROP                    | NO          |
| 'test_user'@'%' | def          | RELOAD                  | NO          |
| 'test_user'@'%' | def          | SHUTDOWN                | NO          |
| 'test_user'@'%' | def          | PROCESS                | NO          |
| 'test_user'@'%' | def          | FILE                    | NO          |
| 'test_user'@'%' | def          | REFERENCES              | NO          |
| 'test_user'@'%' | def          | INDEX                  | NO          |
| 'test_user'@'%' | def          | ALTER                  | NO          |
| 'test_user'@'%' | def          | SHOW DATABASES          | NO          |
| 'test_user'@'%' | def          | SUPER                  | NO          |
| 'test_user'@'%' | def          | CREATE TEMPORARY TABLES | NO          |
| 'test_user'@'%' | def          | LOCK TABLES            | NO          |
| 'test_user'@'%' | def          | EXECUTE                | NO          |
| 'test_user'@'%' | def          | REPLICATION SLAVE      | NO          |
| 'test_user'@'%' | def          | REPLICATION CLIENT      | NO          |
| 'test_user'@'%' | def          | CREATE VIEW            | NO          |
| 'test_user'@'%' | def          | SHOW VIEW              | NO          |
| 'test_user'@'%' | def          | CREATE ROUTINE          | NO          |
| 'test_user'@'%' | def          | ALTER ROUTINE          | NO          |
| 'test_user'@'%' | def          | CREATE USER            | NO          |
| 'test_user'@'%' | def          | EVENT                  | NO          |
| 'test_user'@'%' | def          | TRIGGER                | NO          |
| 'test_user'@'%' | def          | CREATE TABLESPACE      | NO          |
+-----------------+---------------+-------------------------+--------------+
28 rows in set (0.00 sec)

字段含义如下(该表中所有的字段都为 "MySQL extension" 列)

  • GRANTEE:权限拥有者,即账户名称

  • TABLE_CATALOG:该字段总是为def

  • PRIVILEGE_TYPE:权限类型

  • IS_GRANTABLE:拥有该权限的账户是否可以把该权限授予其他人,注意:只有帐号拥有grant option权限时才为YES,否则该字段为NO

该表中的信息还可以使用show语句或者mysql.user表查看

# show语句
root@localhost : information_schema 12:45:35> show grants for test_user@'%';
+------------------------------------------------+
| Grants for test_user@%                        |
+------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'test_user'@'%' |
+------------------------------------------------+
1 row in set (0.00 sec)

# 查询mysql.user表
root@localhost : information_schema 12:46:18> select * from mysql.user where user='test_user'\G;
*************************** 1. row ***************************
              Host: %
              User: test_user
      Select_priv: Y
      Insert_priv: Y
      Update_priv: Y
      Delete_priv: Y
      Create_priv: Y
        Drop_priv: Y
      Reload_priv: Y
    Shutdown_priv: Y
      Process_priv: Y
        File_priv: Y
        Grant_priv: N
  References_priv: Y
        Index_priv: Y
        Alter_priv: Y
      Show_db_priv: Y
        Super_priv: Y
Create_tmp_table_priv: Y
  Lock_tables_priv: Y
      Execute_priv: Y
  Repl_slave_priv: Y
  Repl_client_priv: Y
  Create_view_priv: Y
    Show_view_priv: Y
Create_routine_priv: Y
Alter_routine_priv: Y
  Create_user_priv: Y
        Event_priv: Y
      Trigger_priv: Y
Create_tablespace_priv: Y
          ssl_type: 
        ssl_cipher: 
      x509_issuer: 
      x509_subject: 
    max_questions: 0
      max_updates: 0
  max_connections: 0
max_user_connections: 0
            plugin: mysql_native_password
authentication_string: *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
  password_expired: N
password_last_changed: 2018-01-29 00:44:59
password_lifetime: NULL
    account_locked: N
1 row in set (0.00 sec)

本期内容就介绍到这里,本期内容参考链接如下:

https://dev.mysql.com/doc/refman/5.7/en/status-table.html
https://dev.mysql.com/doc/refman/5.7/en/variables-table.html
https://dev.mysql.com/doc/refman/5.7/en/optimizer-trace-table.html
https://dev.mysql.com/doc/refman/5.7/en/plugins-table.html
https://dev.mysql.com/doc/refman/5.7/en/processlist-table.html
https://dev.mysql.com/doc/refman/5.7/en/profiling-table.html
https://dev.mysql.com/doc/refman/5.7/en/character-sets-table.html
https://dev.mysql.com/doc/refman/5.7/en/collations-table.html
https://dev.mysql.com/doc/refman/5.7/en/column-privileges-table.html
https://dev.mysql.com/doc/refman/5.7/en/schema-privileges-table.html
https://dev.mysql.com/doc/refman/5.7/en/table-privileges-table.html
https://dev.mysql.com/doc/refman/5.7/en/user-privileges-table.html

| 作者简介

罗小波·沃趣科技高级数据库技术专家

IT从业多年,主要负责MySQL 产品的数据库支撑与售后二线支撑。曾参与版本发布系统、轻量级监控系统、运维管理平台、数据库管理平台的设计与编写,熟悉MySQL体系结构,Innodb存储引擎,喜好专研开源技术,多次在公开场合做过线下线上数据库专题分享,发表过多篇数据库相关的研究文章。

发表评论

电子邮件地址不会被公开。 必填项已用*标注