Skip to content

Instantly share code, notes, and snippets.

@shawndxl
Last active August 25, 2016 10:08
Show Gist options
  • Save shawndxl/752afb79d34c8478797f76f6a5400d7d to your computer and use it in GitHub Desktop.
Save shawndxl/752afb79d34c8478797f76f6a5400d7d to your computer and use it in GitHub Desktop.

Redis 使用方法

  • linux 安装redis

  • 开启 redis 服务

  • 关闭 redis 服务 (要指定好药关闭的redis服务器的ip和port.)

 /usr/local/redis/redis-cli -h 127.0.0.1 -p 6379 shutdown
  • 进入指定的数据库 host = 127.0.0.1 && prot = 6379 && database = 3
 redis-cli -h 127.0.0.1 -p 6379 -n 3 
  • 查看已经存储的数据,加入想要查看所有以combat:开头的key
keys combat:*
  • 删除指定存储内容
del 完整key的字符串
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment