Hi Team,
We are getting the below PMM2 configuration issue while adding the mysql metrics to PMM2 agent.
DB Version: Mysql5.7
ERROR:
Connection check failed: Error 1045: Access denied for user ‘pmm’@‘192.168.101.06’ (using password: YES).
root@192.168.101.06:~# pmm-admin listService type Service name Address and port Service ID
Agent type Status Agent ID pmm_agent Connected /agent_id/fghghfgh-28ucb-fhug-a4a4-22fhghghghnode_exporter Running /agent_id/fhfghfgh-d01u6-fghfg-8325-234vyyfrrf
NOTE: MySQL servers is running with SSL. we given the pmm user acces to 192.168.101.06 with required ssl privilege.
Below is the Command we are using:
pmm-admin add mysql --query-source=slowlog --server-insecure-tls --username=‘pmm’ --password=‘pwd’ --host=‘192.168.101.06’ --port=3306NOTE: If we tried to login with pmm user it is working fine, but if tried with the above pmm-admin command it is throwing the above error. Even we tried with the super user and pmm user with % host also, but still we are getting the same issue.Can somebody help us on PMM2 configuration issue.?
Generally we would recommend connecting via socket in case the pmm-client is running on the localhost. However, if you really need SSL connection to the mysqld instance you need to configure ~/.my,cnf with the ssl-ca, ssl-cert, and ssl-key parameters. Then use this command to add mysql service:
pmm-admin add mysql --username=$USER --password=$PASSWORD --tls --tls-skip-verify $SERVICE_NAME $CONNECTION_PARAM
@jrivera Thanks for the help, let me try this and update you.
@jrivera We tried the socket option which you suggested and it worked.
pmm-admin add mysql --username=$USER --password=$PASSWORD --tls --tls-skip-verify $SERVICE_NAME $CONNECTION_PARAM
--socket=/path/mysql.sock
Below is the command which i used.
pmm-admin add mysql --query-source=slowlog --server-insecure-tls --username=‘abc’ --password=‘XXXX’ --socket=/path/mysqld.sock