Fix (repair) MySQL replication in case of duplicate items

If you as i am using MySQL replication mechanism, master-slave or master-master replication you sometimes loose replication due to duplicate entries.

You can fix it by simply skipping the record:
1. log into MySQL:
mysql -u root -p
2. in MySQL shell stop slave replication
mysql> STOP SLAVE;
3. skip the affected record
mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
4. start slave replication process
mysql> START SLAVE;
5. verify that replication is working:
mysql> SHOW SLAVE STATUS \G
6. exit MySQL shell:
mysql> quit;


Provided by:SiQ systems, Cloud experts

Comments

Popular posts from this blog

How to set or disable auto-logout on bash shell

How to install PGPool II on PostgreSQL Servers in master-slave architecture + PGPoolAdmin web managment

Setting Filezilla Server on Amazon EC2 instance with passive ftp