Mysql如何使用sys模式来监控InnoDB?

MySQL sys模式是视图、存储过程和存储函数的集合,帮助MySQL数据库管理员了解MySQL正在做什么,信息采集来自 Performance Schema and  Information Schema。

注意:Sys模式本身不会添加任何信息模式或性能模式中没有的新度量。

通用指标  General Metrics

sys模式的视图是InnoDB指标的一个好的观测点。其中包括以下指标:

  • The information_schema.INNODB_METRICS table
  • The information_schema.GLOBAL_STATUS (MySQL 5.6) or performance_schema.global_status (MySQL 5.7 and later) table.
  • Some memory usage information not specific to InnoDB.

为了能够充分利用这些信息,请将以下内容添加到MySQL配置文件中:

[mysqld] innodb_monitor_enable = '%'