1、
docker ps
[root@iZm7k933o7vzc7Z ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c456fed5004c redis "docker-entrypoint..." 3 weeks ago Up 5 weeks 0.0.0.0:6379->6379/tcp redis
5555b4e6240b mysql:5.7 "docker-entrypoint..." 1 weeks ago Up 2 days
2、 docker exec -it c456 bash
[root@iZm7k933o7vzc7Z ~]# docker exec -it c456 bash
3、通过账号密码登录你的redis redis-cli -p 6379 -a '345sge45uy8yjpA'
root@c4a5fed5004c:/data# redis-cli -p 6379 -a 'N&9sgepAquy8yjpA'
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
?
|