| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
reset master; |
| 4 |
show master status; |
| 5 |
File Position Binlog_Do_DB Binlog_Ignore_DB |
| 6 |
master-bin.000001 329 |
| 7 |
connection slave; |
| 8 |
include/stop_slave.inc |
| 9 |
reset slave; |
| 10 |
Slave_IO_Running = 'No' |
| 11 |
Slave_SQL_Running = 'No' |
| 12 |
Last_SQL_Errno = '0' |
| 13 |
Last_SQL_Error = '' |
| 14 |
Exec_Master_Log_Pos = '0' |
| 15 |
change master to master_host='127.0.0.1'; |
| 16 |
Slave_IO_Running = 'No' |
| 17 |
Slave_SQL_Running = 'No' |
| 18 |
Last_SQL_Errno = '0' |
| 19 |
Last_SQL_Error = '' |
| 20 |
Exec_Master_Log_Pos = '0' |
| 21 |
change master to master_host='127.0.0.1',master_user='root', |
| 22 |
master_password='',master_port=MASTER_PORT; |
| 23 |
include/start_slave.inc |
| 24 |
Slave_IO_Running = 'Yes' |
| 25 |
Slave_SQL_Running = 'Yes' |
| 26 |
Last_SQL_Errno = '0' |
| 27 |
Last_SQL_Error = '' |
| 28 |
Exec_Master_Log_Pos = '329' |
| 29 |
connection master; |
| 30 |
create table t1 (n int, PRIMARY KEY(n)); |
| 31 |
insert into t1 values (10),(45),(90); |
| 32 |
connection slave; |
| 33 |
SELECT * FROM t1 ORDER BY n; |
| 34 |
n |
| 35 |
10 |
| 36 |
45 |
| 37 |
90 |
| 38 |
connection master; |
| 39 |
SELECT * FROM t1 ORDER BY n; |
| 40 |
n |
| 41 |
10 |
| 42 |
45 |
| 43 |
90 |
| 44 |
drop table t1; |
| 45 |
connection slave; |
| 46 |
include/rpl_end.inc |