A valid config file

Hi: I,m weak, aware of it. Would like positive suggestions and ideas.

The configuration file is:

dbPath: “/data/db”
destination: file
path: “/data/logs”
replSetName: “M103”
bind_ip: “,”
keyFile: “/data/keyfile”
fork: true

The proper Mongod configuration:
mongod --port 27000 --dbpath /data/db --auth --bind_ip,

Mongo is the shell, another entrance to MongoDB instead of using Compass
mongo --port 27000 ( applied in bind_ip is the localhost)

I create the first user:
use admin
user: “m103-admin”,
pwd: “m103-pass”,
roles: [
{role: “root”, db: “admin”}

The following piece of code I copied to create the first user from which, I understand, the other 2 nodes will be created. Now, the set has 1 configured user and will be used to create the other 2 nodes : rs.add192.168.103.100,, then rs.rs.add192.168.103.100,

I would like to know where to write this. I would appreciate your suggestions.
Thank you to have fun with me

I would check the following:


and concentrate on the bind_ip. I don’t remember the need to have nor for other nodes. The IP stays the same for all instances of mongod. Only the port is changed.

1 Like

Thank you, Steeve.
I,m boosted to move forward.
Will look at https://docs
Very pleased of your suggestion.

One important distinction: the RS commands have nothing to do with user management. RS stands for ReplicaSet. That is also why this sentence of yours does not compute:

The following piece of code I copied to create the first user from which, I understand, the other 2 nodes will be created.

The rs.add() commands do in fact add the second and third nodes into the replica set. Like the other commands, these are entered into the Mongo shell.

The only command that involves user management is the db.createUser() command which you entered.

Good job so far! Did you already follow M001? That’s the intro course to Python. EDIT: DOH! I meant Mongo

Yes, I have done M001. It was fun and instructive.
I didn,t know it introduced Python. Good course!

Python? Nothing in this thread is Python…

Oh! I didn,t quite understand your comment.
It is I who misunderstood your allusion to Python, that I don,t know.

But keep writing. I did sell to the city of NY and to important corporations with an object-oriented front-end BI tool. My objective is to consult on MongoDB and a front-end tool, probably Power BI from Microsoft.

Thank you for your generous attention,

DOH! I totally had a brain fart there! I meant MongoDB :frowning: