redis(五)-redis.conf
1、命令
1.1 设置conf中的键值。
192.168.16.128:6379> config set requirepass xxxx OK
设置后,登陆时序输入验证(如果redis重启,该密码将被重置):
[root@www redis-3.0.2]# redis-cli -h 192.168.16.128 -p 6379 -a xxxx 192.168.16.128:6379> config get requirepass 1) "requirepass" 2) "xxxx"
1、databases 16
一个redis进程,打开了不止一个数据库,默认打开了16个数据库,从0到15编号。
# Set the number of databases. The default database is DB 0, you can select # a different one on a per-connection basis using SELECT <dbid> where # dbid is a number between 0 and 'databases'-1 databases 16
2、port 6379
客户端连接的端口,也是服务端侦听客户端连接的端口。每个客户端实例,都将再此端口上建立tcp长连接。
# Accept connections on the specified port, default is 6379. # If port 0 is specified Redis will not listen on a TCP socket. port 6379
相关推荐
王道革 2020-11-25
wangdonghello 2020-11-03
Langeldep 2020-11-16
chenhualong0 2020-11-16
聚合室 2020-11-16
koushr 2020-11-12
MRFENGG 2020-11-11
guoyanga 2020-11-10
fackyou00 2020-11-10
Orangesss 2020-11-03
dongCSDN 2020-10-31
rainandtear 2020-10-30
Quietboy 2020-10-30
liuyulong 2020-10-29
fansili 2020-10-29
温攀峰 2020-10-23
jackbon 2020-10-19
kaixinfelix 2020-10-04