python 模块Redis模块,连接Redis数据库
Redis超全语法大全
- 下载地址
- windows:https://github.com/tporadowski/redis/releases,下载zip
- 可视化工具下载链接一:https://github.com/uglide/RedisDesktopManager/releases/tag/0.9.3
- 可视化工具下载链接二:https://redis.io/download/
- 可视化工具下载链接三:https://redis.com/redis-enterprise/redis-insight/
- 配置环境变量
- 系统变量新建Redis_HOME变量,值为解压路径
- 系统变量编辑path新建%Redis_HOME%
- 运行redis-cli -v,运行成功则正常
- 安装服务:打开命令行工具运行 redis-server --service-install D:\redis\redis.windows.conf
- 启动服务:打开命令行工具运行 redis-server --service-start
- 测试redis是否开启,分别运行以下命令
redis-cli
set name redis#设置name的值为hello
get name #获取name值
keys * #匹配当前数据库中所有的ke
- redis默认只允许本地访问,要使Redis可以远程访问,需修改redis对应的配置文件,开启远程访问,修改 redis.windows.conf
- redis命令
卸载服务:redis-server --service-uninstall
开启服务:redis-server --service-start
停止服务:redis-server --service-stop