当前位置:网站首页>Redis learning notes - Database Management
Redis learning notes - Database Management
2022-06-23 09:10:00 【Love Guoba】
Switch receipt Library
select dbindex
MySQL Support the existence of multiple databases under one instance , But relational databases use characters to distinguish different database names ,Redis Use only numbers to distinguish between different databases ,redis The default is 16 A database , stay redis.conf The configuration file has a default configuration databases 16. In general, it is not recommended to use multiple databases to manage the cache , such as Redis Distributed implementation of Redis Cluster Only use 0 The database , If you want to use multiple databases, it is best to arrange multiple databases redis Instances are distinguished by ports , With all instances of 0 The database , Try not to switch databases , So as not to be difficult to maintain
stay 14 No. database settings key by Charlie The data of , Data in other databases are not interconnected
127.0.0.1:6379> get Charlie
(nil)
127.0.0.1:6379> select 14
OK
127.0.0.1:6379[14]> set Charlie "I'm tired"
OK
127.0.0.1:6379[14]> select 0
OK
127.0.0.1:6379> get Charlie
(nil)
Clear data
flushdb/flushall Clear the warehouse carefully
flushdb
flushall
边栏推荐
- js 用**遮罩身份证以及手机号的重要数据
- 瞄准海外宠物市场,「Grasphand 」做了一款独立于手机的智能追踪产品 | 早期项目
- Leetcode topic analysis 3sum
- Redis学习笔记—Redis与Lua
- 670. Maximum Swap
- 简易学生管理
- 36 krypton launched | cloud native database company "tuoshupai" completed a new round of strategic financing, and the valuation has reached the level of quasi Unicorn
- Lua的基本使用
- MySQL故障案例 | mysqldump: Couldn’t execute ‘SELECT COLUMN_NAME
- New engine, new capability, new experience, Tencent host security flagship release
猜你喜欢
随机推荐
Restore the default routing settings of the primary network card
设CPU有16根地址线,8根数据线,并用MREQ作为访存控制线号......存储器与CPU的连接
Mqtt+flink to subscribe and publish real-time messages
GPIO初识
36 krypton launched | cloud native database company "tuoshupai" completed a new round of strategic financing, and the valuation has reached the level of quasi Unicorn
Leetcode topic analysis contains duplicate II
Node request module cookie usage
“教练,我想打篮球“ —— 给做系统的同学们准备的 AI 学习系列小册
Community article | mosn building subset optimization ideas sharing
986. Interval List Intersections
297. Serialize and Deserialize Binary Tree
[qnx hypervisor 2.2 user manual]5.6.1 silent device during guest shutdown
玩转NanoPi 2 裸机教程编程-01点亮User LED难点解析
528. Random Pick with Weight
类型从属名称的使用必须以“typename”为前缀
自定义标签——jsp标签基础
Longest substring without repeated characters (C language)
Structure binary tree from inorder and postorder traversal for leetcode topic analysis
Typora设置图片上传服务
Redis学习笔记—地理信息定位(GEO)







