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

**URL:** <https://forums.percona.com/t/does-pt-table-checksum-require-replication-to-be-setup/17420>\
**Category:** Other MySQL® Questions\
**Created:** [September 12, 2022, 7:43pm UTC](https://forums.percona.com/t/does-pt-table-checksum-require-replication-to-be-setup/17420 "2022-09-12T19:43:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fiyin\_Lamidi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/fiyin_lamidi/32/7712_2.png) [@Fiyin\_Lamidi](https://forums.percona.com/u/Fiyin_Lamidi)\
**Post date:** [September 12, 2022, 7:43pm UTC](https://forums.percona.com/t/does-pt-table-checksum-require-replication-to-be-setup/17420/1 "2022-09-12T19:43:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [September 13, 2022, 1:48am UTC](https://forums.percona.com/t/does-pt-table-checksum-require-replication-to-be-setup/17420/2 "2022-09-13T01:48:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Fiyin\_Lamidi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/fiyin_lamidi/32/7712_2.png) [@Fiyin\_Lamidi](https://forums.percona.com/u/Fiyin_Lamidi)\
**Post date:** [September 14, 2022, 5:17am UTC](https://forums.percona.com/t/does-pt-table-checksum-require-replication-to-be-setup/17420/3 "2022-09-14T05:17:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [September 14, 2022, 11:35am UTC](https://forums.percona.com/t/does-pt-table-checksum-require-replication-to-be-setup/17420/4 "2022-09-14T11:35:44Z")

</div>

Hello, try the --print argument for that

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [September 14, 2022, 7:27pm UTC](https://forums.percona.com/t/does-pt-table-checksum-require-replication-to-be-setup/17420/5 "2022-09-14T19:27:29Z")

</div>

@Fiyin_Lamidi

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

---

<div class="post-metadata">

**Author:** ![Fiyin\_Lamidi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/fiyin_lamidi/32/7712_2.png) [@Fiyin\_Lamidi](https://forums.percona.com/u/Fiyin_Lamidi)\
**Post date:** [September 14, 2022, 8:04pm UTC](https://forums.percona.com/t/does-pt-table-checksum-require-replication-to-be-setup/17420/6 "2022-09-14T20:04:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [September 14, 2022, 8:19pm UTC](https://forums.percona.com/t/does-pt-table-checksum-require-replication-to-be-setup/17420/7 "2022-09-14T20:19:09Z")

</div>

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
