start up:
1. ./redis-server & //Start in the bin directory
2. ./redis-server /usr/local/redis/etc/redis.conf //Configuration file start
set password:
1. config get requirepass //View password
2. (1) config set requirepass "123456" //Set the password to 123456 (restart will fail)
(2) Modify the configuration file redis.conf
requirepass SungoRedis@0521 //Reuse the configuration file to start redis to take effect (recommended)
stop:
1. shutdown //Stop the redis command after connecting to redis
View version
./redis-cli --version //View redis version
Connect to redis:
./redis-cli //connect to redis
auth 123456 //The password is "123456", some operations after obtaining the access permission connection:
flushall clear all data
keys * get all data
get