python 鏈接 redis 失敗 由於目標計算機積極拒絕,無法連接


whereis redis-cli

 

ps -ef |grep redis

1.啟動redis  

redis-server &

2.查看redis 進程
ps -ef |grep redis

3.如果失敗 就kill -9 pid(redis的id)

4.使用:redis-cli
5.進去之后是這個樣子 127.0.0.1:6379>
6設置
 127.0.0.1:6379> CONFIG SET protected-mode no

OK

7.以上就成功啦


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM