Does pt-table-checksum require replication to be setup?

I have a use case where 2 identical mysql servers with similar schemas need to be checksummed, like a dev and stage environment. There is no replication setup between both servers, does dsns work without replication and how do I setup the DSNS table?

1 Like

pt-table-checksum was designed specifically for replication integrity. You can instead use pt-table-sync to compare two tables in different servers. The first server you put on the command-line would be considered the ‘source’ and the ‘dest’ would be modified to match the source. You can have the tool output the changes without executing.

1 Like

Awesome, that worked @matthewb. Is there a way to redirect the output of pt-table-sync to a file?

1 Like

Hello, try the --print argument for that

1 Like

@Fiyin_Lamidi

pt-table-sync ... --print > log_file.txt

1 Like

Thanks @matthewb @Ivan_Groenewold. I actually meant to redirect the output to a table similar to the checksum table of pt-table-checksum.

1 Like

pt-table-sync does not output the information like pt-table-checksum does. pt-t-c is designed to calculate checksums of the rows. That’s it. You then use that data with pt-t-s to correct any issues found. Or pt-t-s operates stand-alone and simply compares two tables and makes one look like the other by executing SQL directly. There are no checksums involved with pt-t-s

1 Like