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

mysql passwords with # and ; #376

Open
aliensmily opened this issue Mar 29, 2019 · 1 comment · May be fixed by #769
Open

mysql passwords with # and ; #376

aliensmily opened this issue Mar 29, 2019 · 1 comment · May be fixed by #769

Comments

@aliensmily
Copy link

Host operating system: output of uname -a

Linux gisu665 4.4.175-94.79-default #1 SMP Thu Feb 21 16:03:55 UTC 2019 (047a6d3) x86_64 x86_64 x86_64 GNU/Linux
=> SUSE Linux Enterprise Server 12 (x86_64) VERSION = 12 PATCHLEVEL = 3

mysqld_exporter version: output of mysqld_exporter --version

mysqld_exporter, version 0.11.0 (branch: HEAD, revision: 5d71796)
build user: root@3d3ff666b0e4
build date: 20180629-15:00:35
go version: go1.10.3

MySQL server version

8.0.13 MySQL Community Server

mysqld_exporter command line flags

/opt/mysql/product/exporters/mysqld_exporter --config.my-cnf=/home/mysqladm/.myMOND.cnf

cat /home/mysqladm/.myMOND.cnf

# Password in "
# Password contains ; and #
[client]
socket=/opt/mysql/admin/mond/config/mysql.sock
user=MON_NOCMONITOR
password=****

What did you do that produced an error?

Starting the exporter with systemctl.

What did you expect to see?

The option file is working fine when using mysql on shell.

mysqladm@host0815:~> mysql --defaults-file=/home/mysqladm/.myMOND.cnf --print-defaults
mysql would have been started with the following arguments:
--socket=/opt/mysql/admin/mond/config/mysql.sock --user=MON_NOCMONITOR --password=*****
mysqladm@host0815:~> mysql --defaults-file=/home/mysqladm/.myMOND.cnf
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2294
Server version: 8.0.13 MySQL Community Server - GPL

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

(MON_NOCMONITOR@localhost) [(none)]> \q

What did you see instead?

Error-Msg: Mar 29 15:51:27 host0815 mysqld_exporter[108908]: time="2019-03-29T15:51:27+01:00" level=error msg="Error pinging mysqld: Error 1045: Benutzer 'MON_NOCMONITOR'@'localhost' hat keine Zugriffsberechti gung (verwendetes Passwort: Ja)" source="exporter.go:119"

Workaround: Changing the password to an password without # and ; worked for the exporter.
Parsing problem? Is this known behaviour?

@SuperQ
Copy link
Member

SuperQ commented Mar 30, 2019

Yes, there are known parsing problems with some valid password characters. There is an open issue about changing how the connection string is handled to help with this. But I have not had time to work on it.

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

Successfully merging a pull request may close this issue.

2 participants