Reputation: 5
Open the links below.
It is showing /var/lib/mongodb in mongo shell:
Here in mongod command it is /data/db:
How to make both of them same?
Upvotes: 0
Views: 48
Reputation: 169268
The mongo shell example says it's bound to port 127.0.0.1:27017.
The one where you start mongo by hand says it's bound to 127.0.0.1:27018.
You have two Mongo servers running, each on a different port and thus assumedly with a different configuration. Shut down the one you don't need – I'd guess the one on 27017 is one that's managed by your Ubuntu installation, and you can use the usual Systemd service management commands to stop it. (Naturally this may cause software expecting there to be a Mongo on 127.0.0.1:27017 to fail.)
Upvotes: 1