Correct command/options: pt-table-sync

Hello,

I’m trying to fix a slave (localhost) that is out of sync with my master (by updating the slave to match what’s on the master). I’ve tried this command below but I only get a response saying “Can’t make changes on host information because it’s a slave”. Is this what I should be using or is it something else?

pt-table-sync --print h=masterhost,D=db,u=user,p=password,t=table h=localhost

Thanks.

Hi Cameron, try the following to generate the statements you need:

pt-table-sync --print --sync-to-master -u user -p pass localhost

The statements generated are meant to always makes the changes on the replication master, never the replication slave directly. Please see the manual for more info.