-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
- Create
mongosdirectory with foldersdb1,db2, anddb3 - Run
mongod --replSet Dist --dbpath mongos/db1 --port 27018 - Run
mongod --replSet Dist --dbpath mongos/db2 --port 27019 - Run
mongod --replSet Dist --dbpath mongos/db3 --port 27020 - In case replicaSet error or it is not initiliazed
- Run
mongosh --port 27018 - Write
rsconfig={_id:"Dist",
members:[
{_id:0, host:"localhost:27018"},
{_id:1, host:"localhost:27019"},
{_id:2, host:"localhost:27020"}
]}
- Run
rs.initiate(rsconfig) - It must be working now!
- Run
rs.status()to make sure it is working well.
Metadata
Metadata
Assignees
Labels
No labels