query-exporter icon indicating copy to clipboard operation
query-exporter copied to clipboard

Unable to set ssl_mode on the dsn for mysql

Open lchopfpt opened this issue 2 years ago • 0 comments

Describe the bug When adding ?ssl_mode=PREFERRED to a mysql DSN using the docker image, I get: MySQL client library does not support ssl_mode specification

Installation details

  • operating system: CentOS 7.9
  • query-exporter installation type:
    • docker image: docker

To Reproduce

If possible, please provide detailed steps to reproduce the behavior: MySQL configured with SSL. Local connections work, yet get Access Denied with query_exporter. So attempted to set ssl_mode=PREFERRED

  1. Config file content (redacted of secrets if needed) databasenamehere: dsn: mysql://user:pass@<host>/<database>?ssl_mode=PREFERRED

  2. Ran query-exporter with the following command line ... docker run -p 9560:9560/tcp -v "/etc/query_exporter.yaml:/config.yaml" --rm -it adonato/query-exporter:latest

  3. Got the error when ... When attempting to do connections, see in the log: MySQL client library does not support ssl_mode specification

lchopfpt avatar Dec 29 '22 01:12 lchopfpt