HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Run MySQL replication by schedule or on demand

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
replicationmysqldemandschedulerun

Problem

I have a master-slave replication currently configured. I know this setup runs real time. Is it possible to sync only the databases on schedule (daily or weekly) or by demand?

Thanks!

Solution

http://dev.mysql.com/doc/refman/5.6/en/replication-delayed.html
says


MySQL 5.6 supports delayed replication such that a slave server
deliberately lags behind the master by at least a specified amount of
time. The default delay is 0 seconds. Use the MASTER_DELAY option for
CHANGE MASTER TO to set the delay to N seconds:


CHANGE MASTER TO MASTER_DELAY = N;


An event received from the master is not executed until at least N
seconds later than its execution on the master. The exceptions are
that there is no delay for format description events or log file
rotation events, which affect only the internal state of the SQL
thread.

Context

StackExchange Database Administrators Q#102003, answer score: 2

Revisions (0)

No revisions yet.