Domanda

I have a MySQL slave under my full control and a master server where I have only read-only login. Also, logins are different. At some point replication have stopped due to some kind of problem.

I would like to use pt-table-sync (https://www.percona.com/doc/percona-toolkit/2.2/pt-table-sync.html) to restore sync between master and slave. However, by default it tries to use same credentials for master and slave. I use --sync-to-master (so it requires only one DSN from command line and attempts to apply its user/password to master that is found out from the slave DB)

How I can tell pt-table-sync to use different credentials to slave and master?

È stato utile?

Soluzione

Yes you can do that, there are switches for the CLI so these will hopefully get you correct access to the slave...

--slave-user and --slave-password

Here is a link to the specific part of the documentation that provides this information

https://www.percona.com/doc/percona-toolkit/LATEST/pt-table-sync.html#cmdoption-pt-table-sync-slave-user

Please note at the top of that page:

This tool changes data, so for maximum safety, you should back up your data before using it.

Disclosure: I work for Percona

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a dba.stackexchange
scroll top