fyi) percona toolkit version is 3.5.7-1
When I create user ‘user’@‘10.X.X.X’ and use recursion-method=processlist,
the error message is
“Error while waiting for replica lag: Use of uninitialized value in string eq at /usr/bin/pt-online-schema-change line 4357.
(in cleanup) Use of uninitialized value in string eq at /usr/bin/pt-online-schema-change line 4357.”
There is no problem. pt-osc connects to localhost:20306 and runs 'SHOW PROCESSLIST" looking for binlog connections (ie: replicas). Whatever IP:PORT is in the processlist, that is what pt-osc will use. If this does not work for you, look at the documentation for using --recursion-method=dsn
If only ‘user’@‘localhost’ exist in MySQL, pt-osc can’t connect to MySQL server because it’s host changed from localhost to ip(e.g, 10.x.x.x)
(Cannot connect to error occurs)
pt-osc discovered you have a replica at IP 10.x.x.x, pt-osc is trying to establish a direct connection to that host to monitor replication. The user ‘user’ needs to exist on the replica with an IP matching that of the server where you are running pt-osc.