Commit e7955418 authored by unknown's avatar unknown

use $MASTER_PORT

parent 615693d2
...@@ -8,21 +8,21 @@ File Position Binlog_do_db Binlog_ignore_db ...@@ -8,21 +8,21 @@ File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79 master-bin.001 79
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 1 master-bin.001 79 Yes 0 0 1 127.0.0.1 root $MASTER_MYPORT 1 master-bin.001 79 Yes 0 0 1
change master to master_log_pos=73; change master to master_log_pos=73;
slave stop; slave stop;
change master to master_log_pos=73; change master to master_log_pos=73;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 1 master-bin.001 73 No 0 0 1 127.0.0.1 root $MASTER_MYPORT 1 master-bin.001 73 No 0 0 1
slave start; slave start;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 1 master-bin.001 73 Yes 0 0 1 127.0.0.1 root $MASTER_MYPORT 1 master-bin.001 73 Yes 0 0 1
change master to master_log_pos=173; change master to master_log_pos=173;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 1 master-bin.001 173 Yes 0 0 1 127.0.0.1 root $MASTER_MYPORT 1 master-bin.001 173 Yes 0 0 1
show master status; show master status;
File Position Binlog_do_db Binlog_ignore_db File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79 master-bin.001 79
......
...@@ -9,16 +9,16 @@ Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Rep ...@@ -9,16 +9,16 @@ Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Rep
change master to master_host='127.0.0.1'; change master to master_host='127.0.0.1';
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 test 9998 60 4 No 0 0 0 127.0.0.1 test 3306 60 4 No 0 0 0
change master to master_host='127.0.0.1',master_user='root', change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT; master_password='',master_port=9306;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 60 4 No 0 0 0 127.0.0.1 root 9306 60 4 No 0 0 0
slave start; slave start;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 60 master-bin.001 79 Yes 0 0 1 127.0.0.1 root 9306 60 master-bin.001 79 Yes 0 0 1
drop table if exists t1; drop table if exists t1;
create table t1 (n int); create table t1 (n int);
insert into t1 values (10),(45),(90); insert into t1 values (10),(45),(90);
......
eval_result;
source include/master-slave.inc; source include/master-slave.inc;
connection master; connection master;
show master status; show master status;
save_master_pos; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status; show slave status;
change master to master_log_pos=73; change master to master_log_pos=73;
slave stop; slave stop;
change master to master_log_pos=73; change master to master_log_pos=73;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status; show slave status;
slave start; slave start;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status; show slave status;
change master to master_log_pos=173; change master to master_log_pos=173;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status; show slave status;
connection master; connection master;
show master status; show master status;
......
...@@ -9,15 +9,12 @@ connection slave; ...@@ -9,15 +9,12 @@ connection slave;
reset slave; reset slave;
show slave status; show slave status;
change master to master_host='127.0.0.1'; change master to master_host='127.0.0.1';
--replace_result 3306 9998 9306 9999 3334 9999 3335 9999
show slave status; show slave status;
eval change master to master_host='127.0.0.1',master_user='root', eval change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT; master_password='',master_port=$MASTER_MYPORT;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status; show slave status;
slave start; slave start;
sync_with_master; sync_with_master;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status; show slave status;
connection master; connection master;
drop table if exists t1; drop table if exists t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment