rpl000015.test 742 Bytes
Newer Older
1 2 3
connect (master,localhost,root,,test,0,mysql-master.sock);
connect (slave,localhost,root,,test,0, mysql-slave.sock);
source include/have_default_master.inc;
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
connection master;
reset master;
show master status;
connection slave;
reset slave;
show slave status;
change master to master_host='127.0.0.1';
show slave status;
change master to master_host='127.0.0.1',master_user='root',
 master_password='',master_port=9306;
show slave status;
slave start;
show slave status;
connection master;
drop table if exists foo;
create table foo (n int);
insert into foo values (10),(45),(90);
21
save_master_pos;
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
22
connection slave;
23
sync_with_master;
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
24
select * from foo;
25 26
connection master;
drop table foo;
27 28 29 30
save_master_pos;
connection slave;
sync_with_master;