当前位置:网站首页>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程序,输入以下命令,检查从数据库的情况是否可以读取在主数据库的内容。
验证可以存在这个主从复制。
边栏推荐
- 深度学习(初识tensorflow2.版本)之三好学生成绩问题(1)
- Introduction to QPM
- npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. npm ER
- LeetCode 接雨水系列 42.(一维) 407.(二维)
- SQL 函数
- Redis notes (12) - single thread architecture (non blocking IO, multiplexing) and multiple asynchronous threads
- 2021-11-29 轨迹规划五次多项式
- Curriculum learning (CL)
- How to correctly open the USB debugging and complete log functions of Huawei mobile phones?
- c语言语法基础之——指针(字符、一维数组) 学习
猜你喜欢

What you need to know to test -- URL, weak network, interface, automation

logback

Detailed explanation of the network security competition questions (2) of the 2021 national vocational college skills competition (secondary vocational group)

Redis 新手入门

2021年全国职业院校技能大赛(中职组)网络安全竞赛试题(1)详细解析教程

Thinkphp5 manual error reporting
![Logical English structure [key points]](/img/4b/52a666ed01087adbc5fa4f9e1db393.png)
Logical English structure [key points]

logback

【AAAI 2021】Few-Shot One-Class Classification via Meta-Learning 【FSOCC via Meta-learning】

Deep learning (tentsorflow2. version) three good student performance problems (1)
随机推荐
MySQL单表500万条数据增、删、改、查速度测试
How to create an IE tab in edge browser
Joint Noise-Tolerant Learning and Meta Camera Shift Adaptation for Unsupervised Person Re-ID
[trajectory planning] testing of ruckig Library
Creation and use of XSync synchronization script (taking debian10 cluster as an example)
自动化测试——pytest框架介绍及示例
Origin of QPM
Getting started with Flink - word statistics
2021-11-29 quintic polynomial of trajectory planning
Industrial and enterprise patent matching data (hundreds of thousands of data) 1998-2014
c语言语法基础之——函数 小程序 求阶乘
Collection object replication
jz2440---使用uboot燒錄程序
LeetCode 498. 对角线遍历
LeetCode 958. Completeness checking of binary tree
SQL高级教程
Thinkphp5 using the composer installation plug-in prompts that the PHP version is too high
pcl install
How does flutter transfer parameters to the next page when switching pages?
Common SQL add / delete / modify query statements