# pt-kill logging to remote server

**URL:** <https://forums.percona.com/t/pt-kill-logging-to-remote-server/3116>\
**Category:** Percona Toolkit\
**Created:** [November 22, 2013, 7:51am UTC](https://forums.percona.com/t/pt-kill-logging-to-remote-server/3116 "2013-11-22T07:51:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ancient\_tech](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@ancient\_tech](https://forums.percona.com/u/ancient_tech)\
**Post date:** [November 22, 2013, 7:51am UTC](https://forums.percona.com/t/pt-kill-logging-to-remote-server/3116/1 "2013-11-22T07:51:46Z")

</div>

I’m having problems to connect pt-kill when I need to run the command on localhost but log the killed processes on a remote server. The user running pt-kill has all necissary permissions and uses a ~/.my.cnf for it’s credentials. The command I run is:

perl pt-kill --host=localhost --busy-time 10 --interval=10s --wait-before-kill=5s --wait-after-kill=5s --victims oldest --nostrip-comments --any-busy-time=10s --log-dsn=h=172.30.16.40,D=percona,t=kill\_log,P=3306,u=ptuser,p=PASSWORD --kill --daemonize

So what I expect is that pt-kill will use the .my.cnf credentials to connect to localhost and then use the --log-dsn for logging killed queries. But it tries to connect to the remote server as root and not ptuser:  
DBI connect(‘;host=DBI:mysql: percona;host=172.30.16.40;port=3306;mysql\_read\_default\_group=client;mysql\_read\_default\_group=client’,‘root’,…) failed: Access denied for user ‘root’@‘172.30.40.49’ (using password: YES) at pt-kill line 1763

If I instead use a table on localhost for logging the killed queries it works fine:  
perl pt-kill --busy-time 10 --host localhost --interval=10s --wait-before-kill=5s --wait-after-kill=5s --victims oldest --nostrip-comments --any-busy-time=10s --log-dsn=h=localhost,D=percona,t=kill\_log,P=3306,u=ptuser,p=PASSWORD --kill --daemonize

What am I doing wrong? Or is it not possible to achieve this. It would be a lot easier if all pt-kill logged to a central table on a remote server.

Brgds
