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

Help with pt-table-checksum

xclusiv8xclusiv8 EntrantCurrent User Role Beginner
Hello everyone!
I want to start by saying that I am by no means an expert in database administration and am still learning. I just finished my education as a software engineer and have gotten a job as an developer / server administrator. This includes maintaining our databases. Our former server administrator quit a while ago and I have been trying to learn everything needed to take his place. He developed a tool for checking if our master and slave servers have any inconsistencies, which has been giving me and him some errors for some time now. I don't really trust this tool and want to try pt-table-checksum but can't get it to work. So this is my problem.

Our setup:
1 master server
1 slave server, connects to master trough ssh-tunnel.
binlog_format = MIXED on both servers.
storage engine = innodb on all tables.

I've been following a guide online on how to make pt-table-checksum work but haven't been successful in my attempts. The guide can be found here: http://www.iheavy.com/2012/04/26/bulletproofing-mysql-replications-with-checksums/

The first command i ran executed correctly.
$ pt-table-checksum --user=abc --password=xyz --replicate=mydb.checksum --create-replicate-table --databases=mysql localhost
  $ pt-table-checksum --replicate=mydb.checksum --replicate-check-only --databases=mysql localhost
The second one is supposed to actually do the checksum comparing as far as i know but it fails with the error message:
Diffs cannot be detected because no slaves were found. Please read the --recursion-method documentation for information.

I started to read up on the recursion-method documentation and created the DSN table. This is where I'm stuck. I don't know what to do to make it all work. In all honesty, I don't really understand all of the recursion-method documentation and what it actually does.

So If a kind soul feels the need to help me in this endeavor please treat me like i'm 3 years old =)

Thank you!

Comments

  • FISHFISH Entrant Current User Role Beginner
    Try with this
    $ pt-table-checksum --replicate=mydb.checksum --replicate-check-only --databases=mysql localhost --recursion-method=processlist
  • xclusiv8xclusiv8 Entrant Current User Role Beginner
    FISH wrote: »
    Try with this
    $ pt-table-checksum --replicate=mydb.checksum --replicate-check-only --databases=mysql localhost --recursion-method=processlist

    Thank you for your time =)

    I tried it and got this.


    What user am i supposed to use? To make sure i understand this. Does pt-table-checksum actually connect to the slave? Because I don't have a user that can connect to the slave. Only the slave can connect to the master via a certain slave_user on the master. This connection is done via SSH.
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.