127.0.0.1:6381> keys * (empty array) 127.0.0.1:6381> ping PONG 127.0.0.1:6381> info replication # Replication role:slave master_host:192.168.92.129 master_port:6379 master_link_status:up master_last_io_seconds_ago:4 master_sync_in_progress:0 slave_read_repl_offset:392 slave_repl_offset:392 slave_priority:100 slave_read_only:1 replica_announced:1 connected_slaves:0 master_failover_state:no-failover master_replid:a5075df9f030230dd8e30b2fb6c917650647850f master_replid2:0000000000000000000000000000000000000000 master_repl_offset:392 second_repl_offset:-1 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:15 repl_backlog_histlen:378 127.0.0.1:6381> keys * 1) "k3" 2) "email" 3) "k2" 4) "k200" 5) "key" 6) "balance" 7) "k10000" 8) "k100" 9) "k300" 10) "list" 11) "k1" 12) "count" 13) "user:001" 127.0.0.1:6381> get k1 "v1" 127.0.0.1:6381> get k4 "v4" 127.0.0.1:6381> info replication # Replication role:slave master_host:192.168.92.129 master_port:6379 master_link_status:down master_last_io_seconds_ago:-1 master_sync_in_progress:0 slave_read_repl_offset:1509 slave_repl_offset:1509 master_link_down_since_seconds:75 slave_priority:100 slave_read_only:1 replica_announced:1 connected_slaves:0 master_failover_state:no-failover master_replid:a5075df9f030230dd8e30b2fb6c917650647850f master_replid2:0000000000000000000000000000000000000000 master_repl_offset:1509 second_repl_offset:-1 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:15 repl_backlog_histlen:1495 127.0.0.1:6381> get k5 "v5" 127.0.0.1:6381> get ksas "ks" 127.0.0.1:6381> shutdown not connected> quit [root@localhost myredis]# vim /myredis/redis6381.conf [root@localhost myredis]# redis-server /myredis/redis6381.conf [root@localhost myredis]# redis-cli -a abc123 -p 6381 Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe. AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? 127.0.0.1:6381> info replication # Replication role:master connected_slaves:0 master_failover_state:no-failover master_replid:6c1d90ea2c305c0bc94d59cf880776628a37cd48 master_replid2:abedbfd0778fa64d6d865a1fef6f3af9a74e04e0 master_repl_offset:2124 second_repl_offset:2125 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:2125 repl_backlog_histlen:0 127.0.0.1:6381> slaveof 192.168.92.129 6379 OK 127.0.0.1:6381> info replication # Replication role:slave master_host:192.168.92.129 master_port:6379 master_link_status:down master_last_io_seconds_ago:-1 master_sync_in_progress:0 slave_read_repl_offset:2124 slave_repl_offset:2124 master_link_down_since_seconds:-1 slave_priority:100 slave_read_only:1 replica_announced:1 connected_slaves:0 master_failover_state:no-failover master_replid:6c1d90ea2c305c0bc94d59cf880776628a37cd48 master_replid2:abedbfd0778fa64d6d865a1fef6f3af9a74e04e0 master_repl_offset:2124 second_repl_offset:2125 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:2125 repl_backlog_histlen:0 127.0.0.1:6381> lrange list 0 -1 1) "0" 2) "9" 3) "8" 4) "6" 5) "5" 6) "4" 7) "3" 8) "2" 9) "1" 10) "5" 11) "4" 12) "3" 13) "2" 14) "1" 127.0.0.1:6381> shutdown not connected> quit [root@localhost myredis]# redis-server /myredis/redis6381.cfg 4314:C 20 Jan 2024 16:48:25.353 # Fatal error, can't open config file '/myredis/redis6381.cfg': No such file or directory [root@localhost myredis]# redis-server /myredis/redis6381.conf [root@localhost myredis]# redis-cli -a abc123 -p 6381 Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe. AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? 127.0.0.1:6381> info replication # Replication role:master connected_slaves:0 master_failover_state:no-failover master_replid:f0cb4a8bc6c80cd62a55a9c199aefe871f41820a master_replid2:7513fad147a6f946a72271ad8c74f19878c9a166 master_repl_offset:2488 second_repl_offset:2489 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:2489 repl_backlog_histlen:0 127.0.0.1:6381> quit [root@localhost myredis]# vim /myredis/redis6381.conf [root@localhost myredis]# redis-server /myredis/redis6381.conf [root@localhost myredis]# redis-cli -a abc123 -p 6381 Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe. AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? 127.0.0.1:6381> info replication # Replication role:master connected_slaves:0 master_failover_state:no-failover master_replid:740f3ad83d22f16994dbc9e5cfb37916f896bbda master_replid2:0000000000000000000000000000000000000000 master_repl_offset:2488 second_repl_offset:-1 repl_backlog_active:0 repl_backlog_size:1048576 repl_backlog_first_byte_offset:0 repl_backlog_histlen:0 127.0.0.1:6381> quit [root@localhost myredis]# vim /myredis/redis6381.conf [root@localhost myredis]# redis-cli -a abc123 -p 6381 Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe. AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? 127.0.0.1:6381> shutdown not connected> quit [root@localhost myredis]# redis-server /myredis/redis6381.conf [root@localhost myredis]# redis-cli -a abc123 -p 6381 Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe. AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? 127.0.0.1:6381> info replication # Replication role:slave master_host:192.168.92.129 master_port:6379 master_link_status:up master_last_io_seconds_ago:2 master_sync_in_progress:0 slave_read_repl_offset:2544 slave_repl_offset:2544 slave_priority:100 slave_read_only:1 replica_announced:1 connected_slaves:0 master_failover_state:no-failover master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c master_replid2:0000000000000000000000000000000000000000 master_repl_offset:2544 second_repl_offset:-1 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:2531 repl_backlog_histlen:14 127.0.0.1:6381> get k6 "v6" 127.0.0.1:6381> slaveof 192.168.92.130 6380 OK 127.0.0.1:6381> info replication # Replication role:slave master_host:192.168.92.130 master_port:6380 master_link_status:down master_last_io_seconds_ago:-1 master_sync_in_progress:0 slave_read_repl_offset:2670 slave_repl_offset:2670 master_link_down_since_seconds:43 slave_priority:100 slave_read_only:1 replica_announced:1 connected_slaves:0 master_failover_state:no-failover master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c master_replid2:0000000000000000000000000000000000000000 master_repl_offset:2670 second_repl_offset:-1 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:2531 repl_backlog_histlen:140 127.0.0.1:6381> info replication # Replication role:slave master_host:192.168.92.130 master_port:6380 master_link_status:down master_last_io_seconds_ago:-1 master_sync_in_progress:0 slave_read_repl_offset:2670 slave_repl_offset:2670 master_link_down_since_seconds:109 slave_priority:100 slave_read_only:1 replica_announced:1 connected_slaves:0 master_failover_state:no-failover master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c master_replid2:0000000000000000000000000000000000000000 master_repl_offset:2670 second_repl_offset:-1 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:2531 repl_backlog_histlen:140 127.0.0.1:6381> get k7 (nil) 127.0.0.1:6381> keys * 1) "k1" 2) "k2" 3) "key" 4) "k4" 5) "user:001" 6) "balance" 7) "k300" 8) "email" 9) "ksas" 10) "k5" 11) "k10000" 12) "k100" 13) "k3" 14) "list" 15) "k200" 16) "k6" 17) "count" 127.0.0.1:6381> slaveof connected_slaves:0 (error) ERR wrong number of arguments for 'slaveof' command 127.0.0.1:6381> slaveof 192.168.92.130 (error) ERR wrong number of arguments for 'slaveof' command 127.0.0.1:6381> slaveof 192.168.92.130 6380 OK Already connected to specified master 127.0.0.1:6381> get k7 (nil) 127.0.0.1:6381> info replication # Replication role:slave master_host:192.168.92.130 master_port:6380 master_link_status:down master_last_io_seconds_ago:-1 master_sync_in_progress:0 slave_read_repl_offset:2670 slave_repl_offset:2670 master_link_down_since_seconds:302 slave_priority:100 slave_read_only:1 replica_announced:1 connected_slaves:0 master_failover_state:no-failover master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c master_replid2:0000000000000000000000000000000000000000 master_repl_offset:2670 second_repl_offset:-1 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:2531 repl_backlog_histlen:140 127.0.0.1:6381> quit [root@localhost myredis]# vim /myredis/redis6381.conf [root@localhost myredis]# redis-cli -a abc123 -p 6381 Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe. AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? 127.0.0.1:6381> shutdown not connected> quit [root@localhost myredis]# redis-server /myredis/redis6381.conf [root@localhost myredis]# redis-cli -a abc123 -p 6381 Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe. AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? 127.0.0.1:6381> info replication # Replication role:slave master_host:192.168.92.130 master_port:6380 master_link_status:up master_last_io_seconds_ago:5 master_sync_in_progress:0 slave_read_repl_offset:3436 slave_repl_offset:3436 slave_priority:100 slave_read_only:1 replica_announced:1 connected_slaves:0 master_failover_state:no-failover master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c master_replid2:0000000000000000000000000000000000000000 master_repl_offset:3436 second_repl_offset:-1 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:3437 repl_backlog_histlen:0 127.0.0.1:6381> get k7 "v7" 127.0.0.1:6381> slaveof no one OK 127.0.0.1:6381> info replication # Replication role:master connected_slaves:0 master_failover_state:no-failover master_replid:e3ba6f8f3e6b0f0ad1ab5457a6ca585408c13112 master_replid2:07c7ade6a35e9d4672d18a9094554e73f3b8c65c master_repl_offset:3940 second_repl_offset:3941 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:3437 repl_backlog_histlen:504 127.0.0.1:6381> keys * 1) "k4" 2) "k5" 3) "key" 4) "k100" 5) "user:001" 6) "count" 7) "k300" 8) "k1" 9) "k6" 10) "k2" 11) "list" 12) "k200" 13) "balance" 14) "email" 15) "k7" 16) "k10000" 17) "k3" 18) "ksas"127.0.0.1:6381> keys *
(empty array)
127.0.0.1:6381> ping
PONG
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:192.168.92.129
master_port:6379
master_link_status:up
master_last_io_seconds_ago:4
master_sync_in_progress:0
slave_read_repl_offset:392
slave_repl_offset:392
slave_priority:100
slave_read_only:1
replica_announced:1
connected_slaves:0
master_failover_state:no-failover
master_replid:a5075df9f030230dd8e30b2fb6c917650647850f
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:392
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:15
repl_backlog_histlen:378
127.0.0.1:6381> keys *
1) "k3"
2) "email"
3) "k2"
4) "k200"
5) "key"
6) "balance"
7) "k10000"
8) "k100"
9) "k300"
10) "list"
11) "k1"
12) "count"
13) "user:001"
127.0.0.1:6381> get k1
"v1"
127.0.0.1:6381> get k4
"v4"
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:192.168.92.129
master_port:6379
master_link_status:down
master_last_io_seconds_ago:-1
master_sync_in_progress:0
slave_read_repl_offset:1509
slave_repl_offset:1509
master_link_down_since_seconds:75
slave_priority:100
slave_read_only:1
replica_announced:1
connected_slaves:0
master_failover_state:no-failover
master_replid:a5075df9f030230dd8e30b2fb6c917650647850f
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:1509
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:15
repl_backlog_histlen:1495
127.0.0.1:6381> get k5
"v5"
127.0.0.1:6381> get ksas
"ks"
127.0.0.1:6381> shutdown
not connected> quit
[root@localhost myredis]# vim /myredis/redis6381.conf
[root@localhost myredis]# redis-server /myredis/redis6381.conf
[root@localhost myredis]# redis-cli -a abc123 -p 6381
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?
127.0.0.1:6381> info replication
# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:6c1d90ea2c305c0bc94d59cf880776628a37cd48
master_replid2:abedbfd0778fa64d6d865a1fef6f3af9a74e04e0
master_repl_offset:2124
second_repl_offset:2125
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:2125
repl_backlog_histlen:0
127.0.0.1:6381> slaveof 192.168.92.129 6379
OK
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:192.168.92.129
master_port:6379
master_link_status:down
master_last_io_seconds_ago:-1
master_sync_in_progress:0
slave_read_repl_offset:2124
slave_repl_offset:2124
master_link_down_since_seconds:-1
slave_priority:100
slave_read_only:1
replica_announced:1
connected_slaves:0
master_failover_state:no-failover
master_replid:6c1d90ea2c305c0bc94d59cf880776628a37cd48
master_replid2:abedbfd0778fa64d6d865a1fef6f3af9a74e04e0
master_repl_offset:2124
second_repl_offset:2125
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:2125
repl_backlog_histlen:0
127.0.0.1:6381> lrange list 0 -1
1) "0"
2) "9"
3) "8"
4) "6"
5) "5"
6) "4"
7) "3"
8) "2"
9) "1"
10) "5"
11) "4"
12) "3"
13) "2"
14) "1"
127.0.0.1:6381> shutdown
not connected> quit
[root@localhost myredis]# redis-server /myredis/redis6381.cfg
4314:C 20 Jan 2024 16:48:25.353 # Fatal error, can't open config file '/myredis/redis6381.cfg': No such file or directory
[root@localhost myredis]# redis-server /myredis/redis6381.conf
[root@localhost myredis]# redis-cli -a abc123 -p 6381
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?
127.0.0.1:6381> info replication
# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:f0cb4a8bc6c80cd62a55a9c199aefe871f41820a
master_replid2:7513fad147a6f946a72271ad8c74f19878c9a166
master_repl_offset:2488
second_repl_offset:2489
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:2489
repl_backlog_histlen:0
127.0.0.1:6381> quit
[root@localhost myredis]# vim /myredis/redis6381.conf
[root@localhost myredis]# redis-server /myredis/redis6381.conf
[root@localhost myredis]# redis-cli -a abc123 -p 6381
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?
127.0.0.1:6381> info replication
# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:740f3ad83d22f16994dbc9e5cfb37916f896bbda
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:2488
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0
127.0.0.1:6381> quit
[root@localhost myredis]# vim /myredis/redis6381.conf
[root@localhost myredis]# redis-cli -a abc123 -p 6381
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?
127.0.0.1:6381> shutdown
not connected> quit
[root@localhost myredis]# redis-server /myredis/redis6381.conf
[root@localhost myredis]# redis-cli -a abc123 -p 6381
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:192.168.92.129
master_port:6379
master_link_status:up
master_last_io_seconds_ago:2
master_sync_in_progress:0
slave_read_repl_offset:2544
slave_repl_offset:2544
slave_priority:100
slave_read_only:1
replica_announced:1
connected_slaves:0
master_failover_state:no-failover
master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:2544
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:2531
repl_backlog_histlen:14
127.0.0.1:6381> get k6
"v6"
127.0.0.1:6381> slaveof 192.168.92.130 6380
OK
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:192.168.92.130
master_port:6380
master_link_status:down
master_last_io_seconds_ago:-1
master_sync_in_progress:0
slave_read_repl_offset:2670
slave_repl_offset:2670
master_link_down_since_seconds:43
slave_priority:100
slave_read_only:1
replica_announced:1
connected_slaves:0
master_failover_state:no-failover
master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:2670
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:2531
repl_backlog_histlen:140
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:192.168.92.130
master_port:6380
master_link_status:down
master_last_io_seconds_ago:-1
master_sync_in_progress:0
slave_read_repl_offset:2670
slave_repl_offset:2670
master_link_down_since_seconds:109
slave_priority:100
slave_read_only:1
replica_announced:1
connected_slaves:0
master_failover_state:no-failover
master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:2670
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:2531
repl_backlog_histlen:140
127.0.0.1:6381> get k7
(nil)
127.0.0.1:6381> keys *
1) "k1"
2) "k2"
3) "key"
4) "k4"
5) "user:001"
6) "balance"
7) "k300"
8) "email"
9) "ksas"
10) "k5"
11) "k10000"
12) "k100"
13) "k3"
14) "list"
15) "k200"
16) "k6"
17) "count"
127.0.0.1:6381> slaveof connected_slaves:0
(error) ERR wrong number of arguments for 'slaveof' command
127.0.0.1:6381> slaveof 192.168.92.130
(error) ERR wrong number of arguments for 'slaveof' command
127.0.0.1:6381> slaveof 192.168.92.130 6380
OK Already connected to specified master
127.0.0.1:6381> get k7
(nil)
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:192.168.92.130
master_port:6380
master_link_status:down
master_last_io_seconds_ago:-1
master_sync_in_progress:0
slave_read_repl_offset:2670
slave_repl_offset:2670
master_link_down_since_seconds:302
slave_priority:100
slave_read_only:1
replica_announced:1
connected_slaves:0
master_failover_state:no-failover
master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:2670
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:2531
repl_backlog_histlen:140
127.0.0.1:6381> quit
[root@localhost myredis]# vim /myredis/redis6381.conf
[root@localhost myredis]# redis-cli -a abc123 -p 6381
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?
127.0.0.1:6381> shutdown
not connected> quit
[root@localhost myredis]# redis-server /myredis/redis6381.conf
[root@localhost myredis]# redis-cli -a abc123 -p 6381
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:192.168.92.130
master_port:6380
master_link_status:up
master_last_io_seconds_ago:5
master_sync_in_progress:0
slave_read_repl_offset:3436
slave_repl_offset:3436
slave_priority:100
slave_read_only:1
replica_announced:1
connected_slaves:0
master_failover_state:no-failover
master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:3436
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:3437
repl_backlog_histlen:0
127.0.0.1:6381> get k7
"v7"
127.0.0.1:6381> slaveof no one
OK
127.0.0.1:6381> info replication
# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:e3ba6f8f3e6b0f0ad1ab5457a6ca585408c13112
master_replid2:07c7ade6a35e9d4672d18a9094554e73f3b8c65c
master_repl_offset:3940
second_repl_offset:3941
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:3437
repl_backlog_histlen:504
127.0.0.1:6381> keys *
1) "k4"
2) "k5"
3) "key"
4) "k100"
5) "user:001"
6) "count"
7) "k300"
8) "k1"
9) "k6"
10) "k2"
11) "list"
12) "k200"
13) "balance"
14) "email"
15) "k7"
16) "k10000"
17) "k3"
18) "ksas"
[root@localhost myredis]# redis-server /myredis/redis6380.conf [root@localhost myredis]# redis-cli -a abc123 -p 6380 Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe. 127.0.0.1:6380> info replication # Replication role:slave master_host:192.168.92.129 master_port:6379 master_link_status:up master_last_io_seconds_ago:4 master_sync_in_progress:0 slave_read_repl_offset:3450 slave_repl_offset:3450 slave_priority:100 slave_read_only:1 replica_announced:1 connected_slaves:1 slave0:ip=192.168.92.131,port=6381,state=online,offset=3450,lag=0 master_failover_state:no-failover master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c master_replid2:0000000000000000000000000000000000000000 master_repl_offset:3450 second_repl_offset:-1 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:3409 repl_backlog_histlen:42 127.0.0.1:6380> set k12 v12 (error) READONLY You can't write against a read only replica. 127.0.0.1:6380> info replication # Replication role:slave master_host:192.168.92.129 master_port:6379 master_link_status:up master_last_io_seconds_ago:2 master_sync_in_progress:0 slave_read_repl_offset:3954 slave_repl_offset:3954 slave_priority:100 slave_read_only:1 replica_announced:1 connected_slaves:0 master_failover_state:no-failover master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c master_replid2:0000000000000000000000000000000000000000 master_repl_offset:3954 second_repl_offset:-1 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:3409 repl_backlog_histlen:546[root@localhost myredis]# redis-server /myredis/redis6380.conf
[root@localhost myredis]# redis-cli -a abc123 -p 6380
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
127.0.0.1:6380> info replication
# Replication
role:slave
master_host:192.168.92.129
master_port:6379
master_link_status:up
master_last_io_seconds_ago:4
master_sync_in_progress:0
slave_read_repl_offset:3450
slave_repl_offset:3450
slave_priority:100
slave_read_only:1
replica_announced:1
connected_slaves:1
slave0:ip=192.168.92.131,port=6381,state=online,offset=3450,lag=0
master_failover_state:no-failover
master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:3450
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:3409
repl_backlog_histlen:42
127.0.0.1:6380> set k12 v12
(error) READONLY You can't write against a read only replica.
127.0.0.1:6380> info replication
# Replication
role:slave
master_host:192.168.92.129
master_port:6379
master_link_status:up
master_last_io_seconds_ago:2
master_sync_in_progress:0
slave_read_repl_offset:3954
slave_repl_offset:3954
slave_priority:100
slave_read_only:1
replica_announced:1
connected_slaves:0
master_failover_state:no-failover
master_replid:07c7ade6a35e9d4672d18a9094554e73f3b8c65c
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:3954
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:3409
repl_backlog_histlen:546