Redis在Windows下启动及基本命令

Redis在Windows下启动及基本命令

1.进入redis根目录,输入下面的指令启动服务器:

redis-server.exe redis.windows.conf

C:\software\tool\redis\Redis-x64-3.2.100>redis-server.exe redis.windows.conf

_._

_.-``__ ''-._

_.-`` `. `_. ''-._ Redis 3.2.100 (00000000/0) 64 bit

.-`` .-```. ```\/ _.,_ ''-._

( ' , .-` | `, ) Running in standalone mode

|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379

| `-._ `._ / _.-' | PID: 2804

`-._ `-._ `-./ _.-' _.-'

|`-._`-._ `-.__.-' _.-'_.-'|

| `-._`-._ _.-'_.-' | http://redis.io

`-._ `-._`-.__.-'_.-' _.-'

|`-._`-._ `-.__.-' _.-'_.-'|

| `-._`-._ _.-'_.-' |

`-._ `-._`-.__.-'_.-' _.-'

`-._ `-.__.-' _.-'

`-._ _.-'

`-.__.-'

[2804] 13 Sep 11:59:02.735 # Server started, Redis version 3.2.100

[2804] 13 Sep 11:59:02.736 * DB loaded from disk: 0.000 seconds

[2804] 13 Sep 11:59:02.739 * The server is now ready to accept connections on po

rt 6379

根据启动服务器后输出的信息可以看到端口号是6379

2.客户端连接服务器,输入如下命令:

C:\software\tool\redis\Redis-x64-3.2.100>redis-cli.exe -p 6379

127.0.0.1:6379>

3.查找所有符合给定模式的key

127.0.0.1:6379> KEYS *

1) "book-name"

2) "name"

3) "runoob"

4) "runoobkey"

4.获取指定key的值

127.0.0.1:6379> get name

"hello"

5.设置指定key的值

127.0.0.1:6379> set name "hello world"

OK

127.0.0.1:6379> get name

"hello world"

🌸 相关推荐

钉钉动态发不了?5大原因为你揭秘!
nowgoal365live score

钉钉动态发不了?5大原因为你揭秘!

📅 09-27 👀 8286
我的世界怎么调时间流逝速度 时间流逝速度调整指令
365体育官网平台手机

我的世界怎么调时间流逝速度 时间流逝速度调整指令

📅 07-04 👀 4647
q币等于多少q点,5q币等于多少点券
完美体育365官方网站入口

q币等于多少q点,5q币等于多少点券

📅 07-01 👀 2425