Correction: it doesn't always default to /var/lib/mysql/mysql.sock, it defaults to mysqlclientlib default which DBI/DBD-mysql use because it (pt-agent) uses host=localhost which results in preferential use of the socket (vs. host=127.0.0.1 results in use of a TCP connection). If socket var for MySQL is different than the mysqlclientlib default, then using host=localhost causes the mismatch.
Correction: it doesn't always default to /var/lib/ mysql/mysql. sock, it defaults to mysqlclientlib default which DBI/DBD-mysql use because it (pt-agent) uses host=localhost which results in preferential use of the socket (vs. host=127.0.0.1 results in use of a TCP connection). If socket var for MySQL is different than the mysqlclientlib default, then using host=localhost causes the mismatch.
See also https:/ /bugs.launchpad .net/percona- toolkit/ +bug/1248363.