redis
在windows中使用
redis
在windows中使用
redis
在windows中使用
启动 redis
1 2 3
| 在redis目录下面执行(执行完后窗口不要关闭)
redis-server.exe redis.windows.conf
|
固定服务安装
1 2 3 4 5
| #这种方式不会有cmd窗口, redis-server.exe --service-install redis.windows.conf
#卸载服务,从windows service服务列表中移除 redis-server.exe --service-uninstall
|
连接redis
三种方法
1 2 3 4 5 6
| 01) 双击`redis-cli.exe`,然后 auth ***(密码)
02) redis-cli.exe -h 127.0.0.1 -p 6379 -a 123456
03) redis-cli.exe -h 127.0.0.1 -p 6379 auth ***(输入密码)
|
使用telnet
连接redis
1 2
| telnet 127.0.0.1 6379 # 回车 auth ***(输入密码)
|
windows
中redis
设置密码
测试
1 2
| set key1 "hello world" get key1
|
常见命令
1 2 3 4
| keys * keys fei* keys bar*
|