Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kyungminchoi opened this issue Mar 11, 2025 · 2 comments · May be fixed by #937
Open

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

kyungminchoi opened this issue Mar 11, 2025 · 2 comments · May be fixed by #937

Comments

@kyungminchoi
Copy link

kyungminchoi commented Mar 11, 2025

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)"

@NordWest
Copy link

Same problem on version="0.17.2". Is this bug fixed?

@aviteshryansg
Copy link

We have been seeing same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants