当前位置:网站首页>WIN10系统实现Redis主从复制
WIN10系统实现Redis主从复制
2022-06-26 09:34:00 【南楚巫妖】
文章借鉴了该博客的思路,但是在基础上有所改变。
借鉴博客:
https://blog.csdn.net/qq_42642549/article/details/108324143
第一步:
打开Redis安装路径:复制三份:复制redis.windows.conf,分别取名为6379、6380、6381,如下面所示。
第二步:
修改从属配置文件:6380.conf、6381.conf文件中修改端口号port和slaveof
port修改
6380修改为port 6380
6381 修改为port 6381
slaveof修改
slaveof 127.0.0.1 6379
这里记住slaveof的前面不能有空格,否则会报错。
第三步:
由于尝试过借鉴博客中的写一个bat文件的时候,在执行的时候会出现乱码,所以我选择采用WIN+R建立三个命令窗口的形式,生成6379、6380、6381三个窗口。建议采用绝对路径启动。
6379
6380
6381
因此表示主从关系实现成功
第四步:验证是否可以主的读写,从的可读。
在原有的安装文件夹里面的redis-cli.exe,输入命令set name hopelei
在启动响应段命令的时候:
会出现NOAUTH的情况,这里需要输入你的账号和密码,在其他端口的客户端开始的时候,也会出现这种情况,解决方法是一样的。
关掉主数据库后,在这里开启一个cmd程序,输入以下命令,检查从数据库的情况是否可以读取在主数据库的内容。
验证可以存在这个主从复制。
边栏推荐
- c语言语法基础之——函数嵌套、递归 小程序斐波那契之和、阶乘
- c语言语法基础之——函数 小程序 求阶乘
- Logical English structure [key points]
- Badge series 5: use of codecov
- 【CVPR 2021】DatasetGAN: Efficient Labeled Data Factory with Minimal Human Effort
- OpenCV depthframe -> pointcloud 导致 segmentation fault!
- 逻辑英语结构【重点】
- 自动化测试——pytest本身及第三方模块介绍及使用
- Badge series 8: generate a personalized Badge
- Redis notes (16) - info instructions and command line tools (view memory, status, number of client connections, monitoring server, scan large keys, sampling server, execute batch commands, etc.)
猜你喜欢

#云原生征文# 在 Google Kubernetes Cluster 上使用 HANA Expression Database Service

Regular expression learning

Curriculum learning (CL)

Badge series 8: generate a personalized Badge

A Style-Based Generator Architecture for Generative Adversarial Networks

【CVPR 2019】Semantic Image Synthesis with Spatially-Adaptive Normalization(SPADE)

软件测试---如何选择合适的正交表
![[trajectory planning] testing of ruckig Library](/img/c7/51c0f6dc3bf7c7fa4528118a4c32fa.png)
[trajectory planning] testing of ruckig Library

Redis novice introduction
![[Journal of Computer Aided Design & computer graphics] overview of research on pedestrian re recognition methods based on generated countermeasure network](/img/a9/1361df052f0474e5c50b948a92c42a.jpg)
[Journal of Computer Aided Design & computer graphics] overview of research on pedestrian re recognition methods based on generated countermeasure network
随机推荐
Logview Pro can be used if the log is too large
This new change of go 1.16 needs to be adapted: the changes of go get and go install
自动化测试——关于unitest与pytest初始化共存问题
3 big questions! Redis cache exceptions and handling scheme summary
c语言语法基础之——函数定义学习
MySQL单表500万条数据增、删、改、查速度测试
Summary of common commands of vim
c语言语法基础之——指针( 多维数组、函数、总结 ) 学习
Badge series 7: use of codacy
Explained: A Style-Based Generator Architecture for GANs (StyleGAN)
Learning to Generalize Unseen Domains via Memory-based Multi-Source Meta-Learning for Person Re-ID
LeetCode 958. Completeness checking of binary tree
Differences between VI and vim and common commands
Redis notes (16) - info instructions and command line tools (view memory, status, number of client connections, monitoring server, scan large keys, sampling server, execute batch commands, etc.)
jz2440---使用uboot燒錄程序
Redis 新手入门
online trajectory generation
QPM performance monitoring components - General
#云原生征文# 在 Google Kubernetes Cluster 上使用 HANA Expression Database Service
Install new version cmake & swig & tinyspline