1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

use $MASTER_PORT

This commit is contained in:
sasha@mysql.sashanet.com
2001-12-01 15:00:32 -07:00
parent 17abb42f3b
commit e78a11f0e4
4 changed files with 9 additions and 15 deletions

View File

@ -8,21 +8,21 @@ File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79
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
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;
slave stop;
change master to master_log_pos=73;
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
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;
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
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;
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
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;
File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79

View File

@ -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';
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
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',
master_password='',master_port=$MASTER_MYPORT;
master_password='',master_port=9306;
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
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;
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
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;
create table t1 (n int);
insert into t1 values (10),(45),(90);

View File

@ -1,21 +1,18 @@
eval_result;
source include/master-slave.inc;
connection master;
show master status;
save_master_pos;
connection slave;
sync_with_master;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
change master to master_log_pos=73;
slave stop;
change master to master_log_pos=73;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
slave start;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
change master to master_log_pos=173;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
connection master;
show master status;

View File

@ -9,15 +9,12 @@ connection slave;
reset slave;
show slave status;
change master to master_host='127.0.0.1';
--replace_result 3306 9998 9306 9999 3334 9999 3335 9999
show slave status;
eval change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
slave start;
sync_with_master;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
connection master;
drop table if exists t1;