About Redis Desktop Manager is unable to connect redis container on Ubuntu

------------ ------------ restore content begins

Cause problems

After the study has been recently decided cache container, learned the power of redis and docker is used in the project to redis caching technology, finally installed in Ubuntu a docker and redis and start normal, but Redis Desktop Manager connections are not a good start redis container, So now solved the problem

Why would such a problem

1. First, we need to use general redis mirroring a docker in, the first thing will be downloaded:

//配置好阿里云加速器
$docker pull redis

//没配置阿里云加速器
$docker pull registry.docker-cn.com/library/redis

2. But this will be a problem, that is the default native redis image does not support external connections, which is the only local connection, which resulted in problems Redis Desktop Manager connections are not

Solution

1. First in first /usr/localcreate a case redisfolder

$sudo mkdir /usr/local/redis

2. Then let redis way mirror external configuration file to boot, in usr/local/rediscreating a case redis.conffile, the file configuration is as follows:

#bind 127.0.0.1     //允许远程连接
protected-mode no
appendonly yes      //持久化
requirepass 123456  //密码 

3. Start with time docker then redis start using this configuration file, as follows:

$docker run -p 6379:6379 --name myredis -v /usr/local/redis/redis.conf redis

4. Redis Desktop Manager when connected, creates a new connection is configured as follows

Name: 你的redis名字
Host: 127.0.0.1
Port 6379
Auth: 123456

5. Click on the link to

End ------------ ------------ restore content

Guess you like

Origin www.cnblogs.com/dotdashdotdash/p/12356228.html