1

I've read the documentation on percona page, but still a bit confused, especially about the --replicate option.

My setting is that the slave is only replicating certain databases from master, say db1 and db2. So I have this following line in the my.cnf file on slave host:

replicate-do-db=db1
replicate-do-db=db2

So when I use the tool, I know I need to pass --databases=db1, db2 as an option, but do I need to write the resulting checksum table into one of these dbs with --replicate=db1.checksum? I know by default it creates a database called percona and writes to percona.checksum, but since I'm not replicating all the databases, will it also create and write such a db on slave?

And after using the tool, should I be running USE db1 before dropping the checksum table on master so that this is logged and sent to slave?

I know this can be easily tested but when I read the documentation mentioning of causing replication failure scared me. I somehow screwed my local MySQL and only having access to this two servers. Appreciate your help.

2

But do I need to write the resulting checksum table into one of these dbs with --replicate=db1.checksum?

Yes, you need. Otherwise it would not be replicated.

And after using the tool, should I be running USE db1 before dropping the checksum table on master so that this is logged and sent to slave?

Yes.

  • Thanks! I've managed to make it run but appreciate your input. – x7qiu Mar 2 '16 at 19:54
1

To add to Sveta's answer, you'll also need to set the flag --no-check-replication-filters so the tool won't complain about them.

https://www.percona.com/doc/percona-toolkit/2.2/pt-table-checksum.html#cmdoption-pt-table-checksum--[no]check-replication-filters

  • Thanks! I've managed to make it run but appreciate your input. – x7qiu Mar 2 '16 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.