Skip to content
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

Need to connect mysql database #123

Closed
manzajohn opened this issue Apr 4, 2024 · 3 comments
Closed

Need to connect mysql database #123

manzajohn opened this issue Apr 4, 2024 · 3 comments

Comments

@manzajohn
Copy link

I need to connect to one of my mysql database running as kubernetes pod. Where can i find the configurations for mysql? i see only Postgres configurations in the repository. Any guidance on connecting mysql database will be appreciated

@dewey
Copy link
Member

dewey commented Apr 4, 2024

Any connection string that can be parsed by https://github.com/go-sql-driver/mysql would work.

@manzajohn
Copy link
Author

manzajohn commented Apr 4, 2024

So i assume, need to make below changes in config.yaml

connections:
  - 'mysql://user:password@tcp(db.query.consul)/db'
And in deployment.yaml should i change this to mysql specific? any reference for the same?
      ```
containers:
      - env:
        - name: CONFIG
          value: /config/config.yml
        - name: PGPASSFILE
          value: /pgpass/pgpass
        - name: TEMPLATE_START
          value: '[['
        - name: TEMPLATE_END
          value: ']]'
        - name: POSTGRES_CONNECTION_DB4
          value: postgres://postgres_exporter@postgres/db4?sslmode=disable
        image: ghcr.io/justwatchcom/sql_exporter:latest

@dewey
Copy link
Member

dewey commented Apr 4, 2024

The configuration file is just an incomplete example on what's possible, you'll have to define what you want in there.

@linear linear bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants