No announcement yet.

pt-kill logging to remote server

  • Filter
  • Time
  • Show
Clear All
new posts

  • pt-kill logging to remote server

    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=,D=percona,t=kill_log,P=3306,u=p tuser,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=;port=3306;mysql_read_def ault_group=client;mysql_read_default_group=client' ,'root',...) failed: Access denied for user 'root'@'' (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=ptus er,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.