Get the App
SLTechnology News&Howtos  ›  Database  › 

Why does MongoDB deploy stand-alone replica sets?

Shulou Source: shulou.com Published: 2022-06-01 13:40:06 10月02日 Update

The ultimate goal of deploying a stand-alone replica set: it is also easy to expand later. Add nodes without downtime.

Add a user group

Groupadd-g 355 mongodb

Add user mgousr02

Useradd-u 369-g mongodb-G mongodb,users-d / data/users/mgousr02-m mgousr02

Modify mgousr01 user password

Passwd mgousr02-stdin rs.initiate (config)

{"ok": 1}

Test data:

Rs0:PRIMARY > use paris

Switched to db paris

Rs0:PRIMARY > for (var itemositani

Tags: User node replica stand-alone no two variable password situation data time tag step environment user group directory purpose red part switch Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Microsoft MariaDB Shulou Technology NVidia