Redis开启远程访问
修改Redis相关配置
Redis默认只允许本地访问,若要redis可以远程访问,得先修改redis.conf
中的配置。
(若是windows环境下,该配置文件名称为 redis.windows-service.conf
)
在redis安装目录下找到redis.conf文件并打开
################################## NETWORK #####################################
# By default, if no "bind" configuration directive is specified, Redis listens
# for connections from all available network interfaces on the host machine.
# It is possible to listen to just one or multiple selected interfaces using
# the "bind" configuration directive, followed by one or more IP addresses.
# Each address can be prefixed by "-", which means that redis will not fail to
# start if the address is not available. Being not available only refer