Some simple redis usage

Start

redis-server
sudo service redis-server start
sudo service redis-server stop

SetPass

redis-cli
# set password temporarily
config set requirepass p@ss$12E45  
vim /etc/redis/redis.conf 
# or on mac system
vim /opt/homebrew/etc/redis.conf

# Add this in the conf
requirepass = <yourpass>

Login

redis-cli 
# if password seted
redis-cli -h <host> -p <port> -a/-u <password>

你可能感兴趣的:(redis,数据库,缓存)