./mysqld_exporter --config.my-cnf=path/to/your/.my.cnf --collect.custom.query.path=custom-queries.yml 5.权限问题: 确保用于mysqld_exporter的 MySQL 用户具有执行SHOW GLOBAL STATUS查询的权限。 6.版本问题: 确保所使用的mysqld_exporter版本支持自定义查询功能。如果你的版本较旧,可能需要升级到最新版本。