root@DESKTOP-0CU081I:/mysqld_exporter-0.12.1.linux-amd64# ./mysqld_exporter INFO[0000] Starting mysqld_exporter (version=0.12.1, branch=HEAD, revision=48667bf7c3b438b5e93b259f3d17b70a7c9aff96) source="mysqld_exporter.go:257" INFO[0000] Build context (go=go1.12.7, user=root@0b3e56a7bc0a, date=20190729-12:35:58) source="mysqld_exporter.go:258" INFO[0000] Enabled scrapers: source="mysqld_exporter.go:269" INFO[0000] --collect.global_status source="mysqld_exporter.go:273" INFO[0000] --collect.global_variables source="mysqld_exporter.go:273" INFO[0000] --collect.slave_status source="mysqld_exporter.go:273" INFO[0000] --collect.info_schema.innodb_cmp source="mysqld_exporter.go:273" INFO[0000] --collect.info_schema.innodb_cmpmem source="mysqld_exporter.go:273" INFO[0000] --collect.info_schema.query_response_time source="mysqld_exporter.go:273" INFO[0000] Listening on :9104 source="mysqld_exporter.go:283"
时间: 2024-03-15 16:42:18 浏览: 15
这段信息表明您已经成功启动了mysqld_exporter,并且它正在监听9104端口。mysqld_exporter是一个用于收集MySQL服务器指标的工具,它可以使用Prometheus进行监控。在您的情况下,mysqld_exporter已经启动并正在运行,您可以在Prometheus中配置它以收集MySQL指标并进行监控。如果您有任何其他问题,请随时问我。
相关问题
root@DESKTOP-0CU081I:/grafana-6.0.0# tail -f /tmp/mysqld_exporter.log mysqld_exporter: error: unknown short flag '-c', try --help
这是一个错误信息,可能是因为在执行 mysqld_exporter 命令时,使用了一个未知的短选项 -c。建议执行 mysqld_exporter --help 命令,查看可用选项。另外,也可以尝试使用长选项 --config.file 来指定配置文件。例如:
```
mysqld_exporter --config.file=/path/to/config.yml
```
root@DESKTOP-0CU081I:/mysqld_exporter-0.12.1.linux-amd64# nohup ./mysqld_exporter -config.my-cnf=".my.cnf" 2>&1 1>/tmp/mysqld_exporter.log & [4] 1481 root@DESKTOP-0CU081I:/mysqld_exporter-0.12.1.linux-amd64# nohup: ignoring input and redirecting stderr to stdout [4]+ Exit 1 nohup ./mysqld_exporter -config.my-cnf=".my.cnf" 2>&1 > /tmp/mysqld_exporter.log root@DESKTOP-0CU081I:/mysqld_exporter-0.12.1.linux-amd64# tail -f /tmp/mysqld_exporter.log mysqld_exporter: error: unknown short flag '-c', try --help
根据您的命令输出及错误信息,您的问题可能是由于在选项 `-config.my-cnf` 之前多了一个 `-` 符号。请尝试使用以下命令,去掉多余的 `-` 符号:
```
nohup ./mysqld_exporter --config.my-cnf=".my.cnf" 2>&1 > /tmp/mysqld_exporter.log &
```
这个命令应该会启动mysqld_exporter,并将输出重定向到`/tmp/mysqld_exporter.log`文件中。如果您仍然遇到问题,请告诉我您的操作系统和mysqld_exporter版本,我会尽力帮助您解决问题。