Comment 0 for bug 1209436

Revision history for this message
markus_albe (markus-albe) wrote : pt-kill won't honor connection parameters provided in config files

lilith:~$ cat pt-kill.conf

defaults-file=/home/kolita/.my.cnf
interval=1
busy-time=5
wait-after-kill=5
ignore-info=(?i-smx:^insert|^update|^delete|^load)
match-info=(?i-xsm:select)
ignore-user=(?i-xsm:root)
daemonize
nostrip-comments
kill-query
log=/tmp/pt-kill.log
log-dsn=F=/home/kolita/pt-kill.cnf,h=127.0.0.1,P=25532,D=percona,t=kill_log

lilith:~$ cat /home/kolita/pt-kill.cnf
[client]
user=msandbox
password=msandbox
host=127.0.0.1
port=25532

lilith:~$ cat /home/kolita/.my.cnf
[client]
user=msandbox
password=msandbox
host=127.0.0.1
port=5532

This works
/tmp/pt-kill --config /home/kolita/pt-kill.conf h=127.0.0.1,P=5532

This does not:
/tmp/pt-kill --config /home/kolita/pt-kill.conf

DBI connect(';mysql_read_default_file=/home/kolita/.my.cnf;host=localhost;mysql_read_default_group=client','',...) failed: Access denied for user 'msandbox'@'localhost' (using password: YES) at /tmp/pt-kill line 2049

This is using patched version Daniel provided for customer (see attachments in 33351). Customer in that issue reported that this worked:

/tmp/pt-kill --version
pt-kill 2.2.3

md5sum /tmp/pt-kill
53f5508840ab97128d62fd19f94aeaad /tmp/pt-kill

/tmp/pt-kill --config /home/kolita/pt-kill.conf --log-dsn=F=/home/kolita/pt-kill.cnf,h=127.0.0.1,P=25532,D=percona,t=kill_log

But when he moved the log-dsn line to the .conf file, then it would stop working. For me log-dsn worked from the .conf file. Attaching output of PTDEBUG for failed run.