categraf v0.2.35
因公司制度要求mysql不能用root这样的权限账号,我参考msyql_exporter的配置创建监控账号如下:
mysql> GRANT REPLICATION CLIENT, PROCESS ON *.* TO
'mysqld_exporter'@'localhost' identified by 'arms_prometheus2022';
mysql> GRANT SELECT ON performance_schema.* TO 'mysqld_exporter'@'localhost';
mysql> FLUSH PRIVILEGES;
这样启动categraf后,监控页面看起来是正常的,但是categraf日志一直有报错,
categraf: 2023/04/10 14:00:45 mysql.go:198: E! failed to ping mysql: Error 1045: Access denied for user 'exporter'@'172.2.2.6' (using password: YES)
找到198行,是个db.ping()
请问下有没有一个的最小化权限设置