2001-01-04 01:56:38 +01:00
|
|
|
connect (master,localhost,root,,test,0,mysql-master.sock);
|
|
|
|
connect (slave,localhost,root,,test,0, mysql-slave.sock);
|
|
|
|
source include/have_default_master.inc;
|
2000-12-13 17:58:26 +01:00
|
|
|
connection master;
|
|
|
|
reset master;
|
|
|
|
show master status;
|
2001-01-22 20:35:16 +01:00
|
|
|
save_master_pos;
|
2000-12-13 17:58:26 +01:00
|
|
|
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;
|
2001-01-22 20:35:16 +01:00
|
|
|
sync_with_master;
|
2000-12-13 17:58:26 +01:00
|
|
|
show slave status;
|
|
|
|
connection master;
|
|
|
|
drop table if exists foo;
|
|
|
|
create table foo (n int);
|
|
|
|
insert into foo values (10),(45),(90);
|
2001-01-17 13:47:33 +01:00
|
|
|
save_master_pos;
|
2000-12-13 17:58:26 +01:00
|
|
|
connection slave;
|
2001-01-17 13:47:33 +01:00
|
|
|
sync_with_master;
|
2000-12-13 17:58:26 +01:00
|
|
|
select * from foo;
|
2001-01-03 01:15:48 +01:00
|
|
|
connection master;
|
|
|
|
drop table foo;
|
2001-01-17 13:47:33 +01:00
|
|
|
save_master_pos;
|
|
|
|
connection slave;
|
|
|
|
sync_with_master;
|
|
|
|
|