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

Support allowCleartextPasswords of MySQL Driver to enable authenticating using Managed identity credentials to MySQL Instance on Azure #884

Open
lmalmeida opened this issue Oct 15, 2024 · 0 comments

Comments

@lmalmeida
Copy link

Host operating system: output of uname -a

Linux fake-name 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Wed Sep 11 18:02:00 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux

mysqld_exporter version: output of mysqld_exporter --version

mysqld_exporter, version 0.15.0 (branch: HEAD, revision: 6ca2a42)
build user: root@c4fca471a5b1
build date: 20230624-04:09:04
go version: go1.20.5
platform: linux/amd64
tags: netgo

MySQL server version

8.0 (Azure Flexible Server)

mysqld_exporter command line flags

N/A

What did you do that produced an error?

Tried to connect to an "Azure MySQL Flexible Server" using Azure AD (Entra ID) authentication. Had setup the username as correct username, and MYSQLD_EXPORT_PASSWORD as a valid token.
When connecting, I got the following message:

caller=exporter.go:152 level=error msg="Error pinging mysqld" err="this user requires clear text authentication. If you still want to use it, please add 'allowCleartextPasswords=1' to your DSN"

Adding "allowCleartextPasswords=1" to dsn file didn't produce expected result, which make sense as

func (m MySqlConfig) FormDSN(target string) (string, error) {
doesn't have any logic to handle this additional parameter.

What did you expect to see?

Allow mysql driver to use cleartext passwords

What did you see instead?

Error message

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

1 participant