I have a production percona master-master cluster. The secondary master has a replication error and using pt-table-sync, I am trying to sync the masters. Looks like binlog_format="STATEMENT" is necessary for any sync operation. Below is the pt-table-sync error
pt-table-sync --verbose --dry-run --sync-to-master h=,u=root,p=,D=,t=
Failed to /!50108 SET @@binlog_format := 'STATEMENT'/: DBD::mysql::db do failed: Access denied; you need (at least one of) the SUPER privilege(s) for this operation [for Statement "/!50108 SET @@binlog_format := 'STATEMENT'/"] at /usr/local/bin/pt-table-sync line 10827.
This tool requires binlog_format=STATEMENT, but the current binlog_format is set to MIXED and an error occurred while attempting to change it. If running MySQL 5.1.29 or newer, setting binlog_format requires the SUPER privilege. You will need to manually set binlog_format to 'STATEMENT' before running this tool. Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle empowern_aws;host=...;mysql_read_default_group=client at /usr/local/bin/pt-table-sync line 10830.
As this is production cluster, is there a way to make pt-table-scan work without braking replication completely? Will manually updating binlog_format on both the masters effect the replication on corresponding slaves?
Appreciate the help.
I take it you mean pt-table-sync, and yes you will be able to make it work (if you haven't already). I wouldn't use the root user and I normally create a temporary user to perform the table sync operations:
This user should be present on both master servers and will allow pt-table-sync to set binlog_format=STATEMENT (for just that session, not globally) before proceeding.
See - https://dev.mysql.com/doc/refman/5.1/en/binary-log-setting.html
In your case if the slaves/replicas have binlog_format=MIXED and you've changed the masters to binlog_format=STATEMENT the slaves/replicas should be able to handle any STATEMENT based replication.
EDIT: Don't forget to remove the temporary user when you are done!