redis 命令

Last updated on July 19, 2024 pm

🧙 Questions

☄️ Ideas

redis登录

默认端口号6379

# sudo docker exec -it isxcode-redis bash
# sudo docker run -it --rm redis redis-cli -h 192.168.66.66 -p 30105 -a leo123
# redis-cli -h 127.0.0.1 -p 6379 -a leo123
redis-cli -h ${host} -p ${port} -a ${password}
# auth leo123
auth ${password}

数据操作

# 切换数据源
select 1

# 插入数据
# set name ispong
set ${key} ${value}

# 查询数据
# get name
get ${key}

# 删除数据
#del name
del ${key}

hashtable

hset tenantId_code M 男
hset tenantId_code F 女

hget vlookup F
hget APPLICATION_CONTAINER_SHIP:
set
SMEMBERS APPLICATION_SET

SADD APPLICATION_SET '"application_1703156931409_0011"'

SREM APPLICATION_SET ' '

redis 命令
https://ispong.isxcode.com/spring/redis/redis 命令/
Author
ispong
Posted on
June 19, 2021
Licensed under