mysqld_exporter icon indicating copy to clipboard operation
mysqld_exporter copied to clipboard

mysql user permission setting

Open spongebobZ opened this issue 5 years ago • 4 comments

Host operating system:

Linux myhostname 3.10.0-957.21.3.el7.x86_64 #1 SMP Fri Jun 14 02:54:29 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux

mysqld_exporter version:

mysqld_exporter, version 0.12.1 (branch: HEAD, revision: 48667bf7c3b438b5e93b259f3d17b70a7c9aff96) build user: root@0b3e56a7bc0a build date: 20190729-12:35:58 go version: go1.12.7

MySQL server version

8.0.16

mysqld_exporter command line flags

level=error msg="Error pinging mysqld: Error 1045: Access denied for user 'exporter'@'::1' (using password: YES)" source="exporter.go:146"

What did you do that produced an error?

just start mysqld_exporter

What did you expect to see?

it can run normally

What did you see instead?

when I use root role to run this it seams normally, but when I use role 'exporter' which granted select, replication client,process to ., then it will send that error log

spongebobZ avatar Dec 16 '19 09:12 spongebobZ

seams got the reason, we can not input '#' to the password for running role

spongebobZ avatar Dec 16 '19 09:12 spongebobZ

seams got the reason, we can not input '#' to the password for running role

many thanks!! Finally, it works 😂😂

ThanhTamPotter avatar Jan 02 '20 11:01 ThanhTamPotter

wow. this is the case for me as well. I am wondering why we can not use '#' in this app? Now I have to create the use without '#' instead of the default random. @spongebobZ

yuecong avatar May 29 '20 15:05 yuecong

CREATE USER 'exporter'@'::1' IDENTIFIED BY 'XXXXXXXX' WITH MAX_USER_CONNECTIONS 3; GRANT PROCESS, REPLICATION CLIENT, SELECT ON . TO 'exporter'@'::1';

crq777 avatar Jun 01 '20 02:06 crq777