Redis common data types and common commands

Introduction

insert image description here

download and install

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-eALdazB9-1692611692564)(../img/image-20230818185720605.png)]

https://github.com/microsoftarchive/redis/releases

https://download.redis.io/releases

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-7OcWHXtr-1692611692564)(../img/image-20230818190215518.png)]

run access

server running

The configuration file needs to enter the full address

D:\Redis-x64-3.0.504>redis-server.exe D:\Redis-x64-3.0.504\redis.windows.conf

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-LUmFTM2W-1692611692564)(../img/image-20230818191300091.png)]

Connect to the database

PS D:\Redis-x64-3.0.504> .\redis-cli.exe
127.0.0.1:6379>

Set database password

Edit the redis.windows.conf file

requirepass 123456

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-EX7BFaWS-1692611692564)(../img/image-20230818192513106.png)]

Connect to database with port password address

PS D:\Redis-x64-3.0.504> .\redis-cli.exe -h localhost -p 6379 -a 123456

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-LUiFWhhj-1692611692565)(../img/image-20230818193110668.png)]

Connect to redis using visualization tools

The server needs to be started before connecting

Address: https://gitee.com/qishibo/AnotherRedisDesktopManager/releases

[External link image transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the image and upload it directly (img-zj9ZRdE7-1692611692565)(../img/image-20230818200421132.png)]

5 common data types

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-K1BJ7y6M-1692611692565)(../img/image-20230818200346437.png)]

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-BfR9rduz-1692611692565)(../img/image-20230818201340420.png)]

Redis common commands

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-eGyUnow9-1692611692566)(../img/image-20230818202822967.png)]

String manipulation commands

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-JXeuoLNN-1692611692566)(../img/image-20230818202657413.png)]

Hash operation command

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-TYC6MdTv-1692611692566)(../img/image-20230818204034234.png)]

list manipulation commands

[External link image transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the image and upload it directly (img-wbrayvmp-1692611692567)(../img/image-20230818204947956.png)]

Set operation command

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-BlRAlMMR-1692611692567)(../img/image-20230818211157168.png)]

Ordered Set Operation Commands

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-AywN5Y32-1692611692567)(../img/image-20230818212400691.png)]

common command

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-oktjr9TB-1692611692567)(../../Review/img/image-20230818231529613.png)]

Guess you like

Origin blog.csdn.net/weixin_43472938/article/details/132413796