| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
connection master; |
| 4 |
connection slave; |
| 5 |
connection master; |
| 6 |
CREATE TABLE t1 (a INT); |
| 7 |
FLUSH BINARY LOGS; |
| 8 |
INSERT INTO t1 VALUES (1); |
| 9 |
connection slave; |
| 10 |
include/stop_slave.inc |
| 11 |
connection master; |
| 12 |
# Shutdown master |
| 13 |
include/rpl_stop_server.inc [server_number=1] |
| 14 |
# Move the master binlog files and the index file to a new place |
| 15 |
# Restart master with log-bin option set to the new path |
| 16 |
# Master has restarted successfully |
| 17 |
connection slave; |
| 18 |
include/start_slave.inc |
| 19 |
connection master; |
| 20 |
# Create the master-bin.index file with the old format |
| 21 |
connection slave; |
| 22 |
include/stop_slave.inc |
| 23 |
connection master; |
| 24 |
# Shutdown master |
| 25 |
include/rpl_stop_server.inc [server_number=1] |
| 26 |
# Move back the master binlog files |
| 27 |
# Remove the unneeded master-bin.index file |
| 28 |
# Restart master with log-bin option set to default |
| 29 |
# Master has restarted successfully |
| 30 |
connection slave; |
| 31 |
include/start_slave.inc |
| 32 |
connection master; |
| 33 |
connection slave; |
| 34 |
# stop slave |
| 35 |
include/stop_slave.inc |
| 36 |
include/rpl_stop_server.inc [server_number=2] |
| 37 |
connection master; |
| 38 |
# relocate binlogs |
| 39 |
# relocate relay logs |
| 40 |
# Restart slave with options log-bin, relay-log set to the new paths |
| 41 |
connection slave; |
| 42 |
# Slave server has restarted successfully |
| 43 |
include/start_slave.inc |
| 44 |
include/stop_slave.inc |
| 45 |
connection master; |
| 46 |
FLUSH LOGS; |
| 47 |
INSERT INTO t1 VALUES (2); |
| 48 |
INSERT INTO t1 VALUES (2); |
| 49 |
INSERT INTO t1 VALUES (2); |
| 50 |
INSERT INTO t1 VALUES (2); |
| 51 |
FLUSH LOGS; |
| 52 |
connection slave; |
| 53 |
FLUSH LOGS; |
| 54 |
include/start_slave.inc |
| 55 |
connection master; |
| 56 |
connection slave; |
| 57 |
include/diff_tables.inc [master:t1,slave:t1] |
| 58 |
connection master; |
| 59 |
DROP TABLE t1; |
| 60 |
connection slave; |
| 61 |
include/stop_slave.inc |
| 62 |
include/rpl_stop_server.inc [server_number=2] |
| 63 |
connection master; |
| 64 |
# remove tmpdir |
| 65 |
# restarted with previous slave settings |
| 66 |
connection slave; |
| 67 |
include/start_slave.inc |
| 68 |
connection master; |
| 69 |
include/rpl_end.inc |