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