Bug #112185 | DATA_SOURCE_NAME is not compatible with myqsld-exporter | ||
---|---|---|---|
Submitted: | 25 Aug 2023 17:24 | Modified: | 7 Sep 2023 14:32 |
Reporter: | Brock Alberry | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Operator | Severity: | S3 (Non-critical) |
Version: | 8.1.0-2.1.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[25 Aug 2023 17:24]
Brock Alberry
[7 Sep 2023 14:32]
MySQL Verification Team
Thanks for the report. I'm not sure if this is a bug or just configuration change but I'll be verifying this and will wait for operator team to decide how to proceed. thanks
[9 Jan 12:32]
Martin Fleurke
The operator already creates a my.cfg file. The only problem is that in that file, it has socket=unix:///var/run/mysqld/mysql.sock And this results in log output like: time=2025-01-09T12:23:14.089Z level=ERROR source=exporter.go:131 msg="Error opening connection to database" err="dial unix unix:///var/run/mysqld/mysql.sock: connect: no such file or directory" If it is changed to socket=/var/run/mysqld/mysql.sock then it works fine on the 0.15+ versions of the exporter.
[9 Jan 12:39]
Martin Fleurke
https://github.com/mysql/mysql-operator/pull/39 fixes this problem.
[10 Jan 19:42]
OCA Admin
Contribution submitted via Github - Fix for bug #112185 - metrics collector v0.15.0+ cannot connect to unix socket (*) Contribution by Martin Fleurke (Github amfleurke, mysql-operator/pull/39#issuecomment-2582118705): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: git_patch_2268300270.txt (text/plain), 910 bytes.