我使用Redis的-CLI之前(不知道这个盒子),但现在它给我这个:Redis的-CLI不工作
[email protected]:~$ redis-cli
usage: redis-cli [-h host] [-p port] [-r repeat_times] [-n db_num] cmd arg1 arg2 arg3 ... argN
usage: echo "argN" | redis-cli [-h host] [-p port] [-r repeat_times] [-n db_num] cmd arg1 arg2 ... arg(N-1)
If a pipe from standard input is detected this data is used as last argument.
example: cat /etc/passwd | redis-cli set my_passwd
example: redis-cli get my_passwd
example: redis-cli -r 100 lpush mylist x
所以,我netcat来Redis的服务器和我能够沟通:
[email protected]:~$ ncat 127.0.0.1 6379
info
$336
redis_version:1.2.0
arch_bits:32
multiplexing_api:epoll
uptime_in_seconds:332
uptime_in_days:0
connected_clients:1
etc...
我已经试过指定IP和端口:redis-cli -h 127.0.0.1 -p 6379
(没有成功)
没什么大不了的,但奇怪的。
关于为什么会发生这种情况的任何想法?感谢stackoverflow!
你说得对,我会回答我的最后一个问题晚上,但连接失败。欣赏你的时间。 – nak