Linux下设置redis访问密码的方法


当前第2页 返回上一页

通过密码-a访问:

1

> redis-cli -h 192.168.17.105 -p 6379 -a 123

运行结果:

1

2

3

4

5

6

7

8

9

10

11

12

13

[root@lnp etc]# redis-cli

Could not connect to Redis at 127.0.0.1:6379: Connection refused

Could not connect to Redis at 127.0.0.1:6379: Connection refused

not connected> exit

[root@lnp etc]# redis-cli -h 192.168.17.105 -p 6379

192.168.17.105:6379> keys *

(error) NOAUTH Authentication required.

192.168.17.105:6379> exit

[root@lnp etc]# redis-cli -h 192.168.17.105 -p 6379 -a 123

Warning: Using a password with '-a' option on the command line interface may not be safe.

192.168.17.105:6379> keys *

(empty list or set)

192.168.17.105:6379> exit

以上就是Linux下设置redis访问密码的方法的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

Redis是什么

Redis默认端口是什么

Redis判断key是否存在

Redis 更新(set) key值过期时间被重置

Redis缓存击穿怎么办

Redis键过期设置

RedisRedis扩展在linux平台的安装

数据哪些放Redis哪些放数据库

Redis有序集合的相关命令有哪些

Redis中set和hset的区别和使用场景

更多相关阅读请进入《Redis》频道 >>


数据库系统概念 第6版
书籍

数据库系统概念 第6版

机械工业出版社

本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...