Greetings,

I want to use various Percona Toolkit tools without providing the user/password in the command line.
(The tools do work properly with user/password in the command line.)

I have a file which works fine for my mysql coomands.
> cat credentials-root.cnf
[client]
user="root"
password="root321"

> mysql --defaults-extra-file=/home/mysql/local/dbscript/credentials-root.cnf -e "select now()"
+---------------------+
| now() |
+---------------------+
| 2019-05-20 13:05:54 |
+---------------------+


However , when i try to use that file for Percona tools (like pt-mysql-summary, for example) - it doesn't work :
> pt-mysql-summary --defaults-file=/home/mysql/local/dbscript/credentials-root.cnf
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
2019_05_20_13_06_55 Cannot connect to MySQL. Check that MySQL is running and that the options after -- are correct.

> pt-mysql-summary --config=/home/mysql/local/dbscript/credentials-root.cnf
ERROR 1045 (28000): Access denied for user 'mysql'@'localhost' (using password: NO)
2019_05_20_13_07_48 Cannot connect to MySQL. Check that MySQL is running and that the options after -- are correct.


What am i doing wrong ?

Best regards,
Avi