re-enabling a table for mysql replication

Posted by jessieE on Server Fault See other posts from Server Fault or by jessieE
Published on 2013-10-23T08:05:13Z Indexed on 2013/10/23 10:00 UTC
Read the original article Hit count: 530

We were able to setup mysql master-slave replication with the following version on both master/slave:

mysqld Ver 5.5.28-29.1-log for Linux on x86_64 (Percona Server (GPL), Release 29.1)

One day, we noticed that replication has stopped, we tried skipping over the entries that caused the replication errors. The errors persisted so we decided to skip replication for the 4 problematic tables. The slave has now caught up with the master except for the 4 tables.

What is the best way to enable replication again for the 4 tables?

This is what I have in mind but I don't know if it will work:

1) Modify slave config to enable replication again for the 4 tables

2) stop slave replication

3) for each of the 4 tables, use pt-table-sync --execute --verbose --print --sync-to-master h=localhost,D=mydb,t=mytable

4) restart slave database to reload replication configuration

5) start slave replication

© Server Fault or respective owner

Related posts about mysql

Related posts about replication