# PMM2 - Client Configuration issue - Connection check failed

**URL:** <https://forums.percona.com/t/pmm2-client-configuration-issue-connection-check-failed/7908>\
**Category:** Percona XtraBackup\
**Tags:** mysql\
**Created:** [August 14, 2020, 8:29am UTC](https://forums.percona.com/t/pmm2-client-configuration-issue-connection-check-failed/7908 "2020-08-14T08:29:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naresh9999](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/naresh9999/32/5568_2.png) [@Naresh9999](https://forums.percona.com/u/Naresh9999)\
**Post date:** [August 14, 2020, 8:29am UTC](https://forums.percona.com/t/pmm2-client-configuration-issue-connection-check-failed/7908/1 "2020-08-14T08:29:09Z")

</div>

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](mailto:root@192.168.101.06):~# pmm-admin listService type&nbsp; Service name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Address and port&nbsp; Service ID  
Agent type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Status&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Agent ID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pmm\_agent&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; **Connected&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;** /agent\_id/fghghfgh-28ucb-fhug-a4a4-22fhghghghnode\_exporter&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; **Running&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;** /agent\_id/fhfghfgh-d01u6-fghfg-8325-234vyyfrrf  
NOTE: MySQL servers is running with SSL. we given the pmm user acces to&nbsp; **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&nbsp; **%** host also, but still we are getting the same issue.Can somebody help us on PMM2 configuration issue.?

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [August 15, 2020, 6:34am UTC](https://forums.percona.com/t/pmm2-client-configuration-issue-connection-check-failed/7908/2 "2020-08-15T06:34:50Z")

</div>

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:

```auto
pmm-admin add mysql --username=$USER --password=$PASSWORD --tls --tls-skip-verify $SERVICE_NAME $CONNECTION_PARAM

```

---

<div class="post-metadata">

**Author:** ![Naresh9999](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/naresh9999/32/5568_2.png) [@Naresh9999](https://forums.percona.com/u/Naresh9999)\
**Post date:** [August 17, 2020, 4:43am UTC](https://forums.percona.com/t/pmm2-client-configuration-issue-connection-check-failed/7908/3 "2020-08-17T04:43:41Z")

</div>

@jrivera&nbsp; Thanks for the help, let me try this and update you.

---

<div class="post-metadata">

**Author:** ![Naresh9999](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/naresh9999/32/5568_2.png) [@Naresh9999](https://forums.percona.com/u/Naresh9999)\
**Post date:** [August 17, 2020, 11:22am UTC](https://forums.percona.com/t/pmm2-client-configuration-issue-connection-check-failed/7908/4 "2020-08-17T11:22:09Z")

</div>

@jrivera&nbsp; We tried the socket option which you suggested and it worked.

```auto
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
