1> Don't replicate particular command to slave:
Log on to master:
mysql> SET SQL_LOG_BIN=0;
mysql> Any DDL or DML command
mysql> exit
Note:
1> The command issued above will not get replicated to slave. Means, it will not get captured at mysql binary log. Thus, not replicated.
2> Be cautious, as it may lead to replication break in future.
2> Ignore Replication command at slave:
Let's say, we face a situation where slave not able to execute particular command which results in replication break for that time.
Log on to slave:
mysql> STOP SLAVE;
mysql> SET GLOBAL sql_slave_skip_counter = 1;
mysql> START SLAVE;
Note: Be cautious, Don't use above command on tables which have high DML rate. As it may lead to replication break in future.
Log on to master:
mysql> SET SQL_LOG_BIN=0;
mysql> Any DDL or DML command
mysql> exit
Note:
1> The command issued above will not get replicated to slave. Means, it will not get captured at mysql binary log. Thus, not replicated.
2> Be cautious, as it may lead to replication break in future.
2> Ignore Replication command at slave:
Let's say, we face a situation where slave not able to execute particular command which results in replication break for that time.
Log on to slave:
mysql> STOP SLAVE;
mysql> SET GLOBAL sql_slave_skip_counter = 1;
mysql> START SLAVE;
Note: Be cautious, Don't use above command on tables which have high DML rate. As it may lead to replication break in future.
No comments:
Post a Comment