查看performance_schema的属性
Variable_name | Value |
performance_schema | ON |
在mysql的5.7版本中,性能模式是默认开启的,如果想要显式的关闭的话需要修改配置文件,不能直接进行修改,会报错:Variable 'performance_schema' is a read only variable。
在配置文件中修改performance_schema的属性值,on表示开启,off表示关闭。
[mysqld]
performance_schema=ON
查看performance_schema下的所有表
use performance_schema;
show tables;
下面我们需要理解两个基本概念:
instruments
生产者,用于采集mysql中各种各样的操作产生的事件信息,对应配置表中的配置项我们可以称为监控采集配置项。
consumers
消费者,对应的消费者表用于存储来自instruments采集的数据,对应配置表中的配置项我们可以称为消费存储配置项。