3

I am trying to configure the ports in Redis database. I have changed the port number to 7778 in the redis.conf file. This file is in /etc/redis.conf

and I'm using this command

redis-server /etc/redis.conf

And this goes through. I'm able to get through. However if I execute this command

redis-cli 

or

redis-cli /etc/redis.conf

I'm getting this error

could not connect to redis at 127.0.0.1:6379:connection refused.

I then tried this command

redis-cli -p 7778

127.0.0.1> ping
(error) NOAUTH authentication required
Braiam
  • 67,791
  • 32
  • 179
  • 269
user3256847
  • 31
  • 1
  • 2
  • 4

3 Answers3

1
  1. 127.0.0.1> AUTH your password
  2. OK <--response from redis
  3. (7.75s) <--- it's too.
  4. 127.0.0.1>ping <--test if you want
  5. PONG <--you can receive response from redis

  6. you can use AUTH keyword :) and after write your password.

1

I have had the same problem because I changed the bind IP address in /etc/redis.conf

So I manually set the host ip by using this command:

redis-cli -h 192.168.1.100 -p 7778

Then it started working for me.

Fabby
  • 34,259
Maxter
  • 11
0
redis-cli -p 7778

127.0.0.1> ping
(error) NOAUTH authentication required

Port is working. But you need enter password:

>auth <yourpassword>

OR

redis-cli -p 7778 -a <yourpassword>

OR remove requirepass in /etc/redis.conf

slava
  • 3,887