# How can I get Pt-table-checksum to show diffs?

**URL:** <https://forums.percona.com/t/how-can-i-get-pt-table-checksum-to-show-diffs/2581>\
**Category:** Percona Toolkit\
**Created:** [September 4, 2012, 7:41am UTC](https://forums.percona.com/t/how-can-i-get-pt-table-checksum-to-show-diffs/2581 "2012-09-04T07:41:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![omggs](https://avatars.discourse-cdn.com/v4/letter/o/9fc348/32.png) [@omggs](https://forums.percona.com/u/omggs)\
**Post date:** [September 4, 2012, 7:41am UTC](https://forums.percona.com/t/how-can-i-get-pt-table-checksum-to-show-diffs/2581/1 "2012-09-04T07:41:30Z")

</div>

I am using Pt-table-checksum to verify replication integrity. I have intentionally changed a column in a row in one of my replicas. Here is what I did-

pt-table-checksum “h=192.168.1.86,u=replication,p=replication,P=3320” --function=MD5 --databases=test

and the output I get is

TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE09-04T18:21:46 0 0 3 1 0 0.112 test.xyz

My question is, should not the DIFFS column in the output say 1 instead of 0? What am I missing here?

Can Pt-table-checksum also tell the diffs in the replicas by pin pointing to that row?

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [September 13, 2012, 3:24am UTC](https://forums.percona.com/t/how-can-i-get-pt-table-checksum-to-show-diffs/2581/2 "2012-09-13T03:24:42Z")

</div>

Hi, It should work. I have tested locally with simple master-slave replication.

On Master,

mysql\> select count(_) from nil.test1;±---------+| count(_) |±---------+| 12 |±---------+1 row in set (0.00 sec)

On slave,

mysql\> select count(_) from nil.test1;±---------+| count(_) |±---------+| 8 |±---------+1 row in set (0.00 sec)

See below,

nil@Dell-System-XPS-L502X:~$ pt-table-checksum -h 127.0.0.1 -u user -ppass --port=19771 --databases=nil TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE09-13T13:59:25 0 1 12 1 0 0.716 nil.test109-13T13:59:26 0 0 0 1 0 0.634 nil.test2

Can you try again to check that pt-table-checksum can able to connect to slave or not?

pt-table-checksum, only tell the differences in the replicas but If you want to check which data differences are there than you can use pt-table-sync utility with --print option. It will give you “REPLACE INTO” queries of differences.

[http://www.percona.com/doc/percona-toolkit/2.1/pt-table-sync](http://www.percona.com/doc/percona-toolkit/2.1/pt-table-sync) .html

---

<div class="post-metadata">

**Author:** ![omggs](https://avatars.discourse-cdn.com/v4/letter/o/9fc348/32.png) [@omggs](https://forums.percona.com/u/omggs)\
**Post date:** [September 14, 2012, 4:51am UTC](https://forums.percona.com/t/how-can-i-get-pt-table-checksum-to-show-diffs/2581/3 "2012-09-14T04:51:21Z")

</div>

Tried again, but it simply does not work for me. But I see that .

Both Master and Slave have MySQL version: 5.1.36-community-log

Quote:

> [@](#):
>
> Can you try again to check that pt-table-checksum can able to connect to slave or not?

As far as I have understood has to connect to the Master server only. Am I mistaken?
