redis基礎操作--redis登錄


# 查找redis命令的路徑

find / -name redis-cli

[root@t-enter ~]# find / -name redis-cli
/usr/local/bin/redis-cli
/usr/local/redis-5.0.5/src/redis-cli

redis登錄命令

redis-cli -p 6379 -a root123 # 使用密碼端口登錄命令
redis-cli         # 無密碼端口登錄命令
redis-cli -h host -p port -a password # 在遠程登錄redis

示例

使用密碼端口登錄命令
[root@localhost src]# redis-cli -p 6379 -a root123
Warning: Using a password with '-a' option on the command line interface may not be safe.
127.0.0.1:6379> 
無密碼端口登錄命令
[root@t-enter ~]# redis-cli
127.0.0.1:6379> 

 遠程登錄redis命令

#redis-cli -h 127.0.0.1 -p 6379 -a "mypassword"
redis 127.0.0.1:6379>


免責聲明!

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



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