Not the answer you need?
Register and ask your own question!

pt-table-sync and SSH tunnels

CameronFCameronF EntrantInactive User Role Beginner
Not sure if I've diagnosed this properly, but here is what I'm running into. We have a master slave setup, with the master residing on server A, slave on server B. The slave communicates with the master on a different port, let's call it 3307. This shows up properly in SHOW SLAVE STATUS, and when I look at the DSN output of the pt-table-sync command, it reflects that:

# TableSyncer:5950 27054 Binlog trace message: src_db:my_db src_tbl: promotions src_dsn: D=my_db,P=3307,h=localhost,t=promotions dst_db:my_db dst_tbl: promotions dst_dsn: D=my_db,h=localhost,t=promotions lock:0 transaction:0 changing_src:1 replicate:0 bidirectional:0 pid:27054

However, the way that the servers communicate is via an SSH tunnel.

When I connect to server B with SqlPro, and tell it to use port 3306, I am querying the slave. No problem.
When I connect to server B with SqlPro, and tell it to use port 3307, I in fact, am talking to master, and see the query results from master.

However, when pt-table-sync attempts to connect to master, via port 3307 on the slave machine, it seems to end up talking to the slave, not the master.

Is this because the DBs are connecting using SSH tunnels, rather than port/sockets? Is there any way around this?

Thanks,
-Cam
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.