Categories
DBA MySQL Replication

MySQL replication recovery

MySQL replication can stop if slave fails to execute SQL statement from the binary log. From that moment, slave prints last error and waits for replication recovery. If master has consistent snapshot, then is only necessary to re-point slave to the new master position. It can be done with change master to or sql_slave_skip_counter.

via MySQL replication recovery.

Categories
MySQL Replication

MySQL Replication Series tip #1: what should be replicated

MySQL Replication Series tip #1: what should be replicated and what should not be replicated? | Technology: Learn and Share

Welcome to Tip #1 in MySQL Replication Series. In this tip we will go over what to do when you only want to replicate certain data to slaves. Most general way to tell what is replicated to which slave is to include following configuration directive in my.cnf file depending on your environment and your goals. We will start with slave server side options since you have more flexibility on slave on what to replicate and what not to.

Categories
DBA MySQL Replication

MySQL Slave Errors?

When you do a SHOW SLAVE STATUSG and you see errors you need to resolve them. One way is to simply skip the offending statement.

SLAVE STOP;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
SLAVE START;

Repeat as desired.

SET GLOBAL SQL_SLAVE_SKIP_COUNTER documentation