Skip to content

My MySQL connection status is normal but mysql_up == 0 #933

@kyungminchoi

Description

@kyungminchoi

hello,
I am trying to connect to many databases from one server.

When I check directly on the server, all database connections are normal.
However, mysql exporter shows most of them as mysql_up==0.

Here are the items I checked ((The results are normal for all targets.)):

  1. mysql -h10.x.x.x -Pxxx -uxxx -pxxx!@#
  2. SELECT 1;
  3. SHOW GLOBAL STATUS;
  4. SHOW VARIABLES;

Note that some targets have the same IP but different users.
I deployed the exporter to kubernetes using helm chart.

Here are my target information:

  multipleTarget:
    enabled: true
    targets: 
      # target connection information with name (required), endpoint (required), port (optional), user(optional), password(optional)
      - name: xxx
        endpoint: 10.x.x.x
        port: xxx
        user: xxx
        password: "xxx!@#123"

Among these, the targets with mysql_up==1 are Scheulder, Scheduler(Airflow), Marketplace API, and Security Compliance.
I don't know what the difference is between them, so please let me know what else I should check.

Here is the log of my mysql exporter.

time=2025-03-11T02:40:03.090Z level=ERROR source=mysqld_exporter.go:174 msg="Failed to parse section [client] from config file" err=<nil>
time=2025-03-11T02:40:03.092Z level=ERROR source=exporter.go:131 msg="Error opening connection to database" err="dial tcp 127.0.0.1:3306: connect: connection refused"
time=2025-03-11T02:40:03.286Z level=ERROR source=exporter.go:131 msg="Error opening connection to database" err="Error 1045 (28000): Access denied for user 'xxx'@'10.x.x.x' (using password: YES)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions