命令行连接redis redis-cli.exe -h 127.0.0.1 -p 6379 常用操作命令 info #查看服务器信息 select <dbsize> #选择数据库索引 select 1 flushall #清空全部数据 flushdb #清空当前索引的数据库 slaveof <服务器> <端口> #设置为从服务器 slaveof no one #设置为主服务器 shutdown #关闭服务
停止和启动redis服务
管理员权限打开powershell
停止:net stop redis
启动:net start reids
下面两个命令也可以
开启服务:redis-server --service-start
停止服务:redis-server --service-stop
参考
https://www.cnblogs.com/zxtceq/p/5461742.html
https://www.cnblogs.com/liyanbofly/p/7766707.html