[root@iZb6mlw07n8yxtZ ~]# docker exec -it 39c9110e27e2 redis-cli
127.0.0.1:6379> info
NOAUTH Authentication required.

解决方案

auth password

[root@iZb6mlw07n8yxtZ ~]# docker exec -it 39c9110e27e2 redis-cli
127.0.0.1:6379> info
NOAUTH Authentication required.
127.0.0.1:6379> auth mypassword
OK
127.0.0.1:6379> info
# Server
redis_version:5.0.3
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:ebd41829fe7256ee
redis_mode:standalone
os:Linux 3.10.0-957.1.3.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:6.3.0
process_id:1
run_id:63fe16e4221c939d79c4e23288cb9f41ea2cd1de
tcp_port:6379
uptime_in_seconds:456
uptime_in_days:0
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐