Redis连接时报错:
[root@localhost src]# ./redis-cli -a 123456
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
Could not connect to Redis at 127.0.0.1:6379: Connection refused
意为 无法连接到127.0.0.1:6379的Redis:连接被拒绝
先检查redis.conf中的daemonzie no有没有改成yes
启动客户端前要保证服务端启动
[root@localhost src]# ./redis-server ../redis.conf
再次启动就成功了
[root@localhost src]# ./redis-cli -a 123456
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
Warning: AUTH failed
127.0.0.1:6379>