Localhost Binding by DefaultĀ¶. By default, MongoDB launches with bindIp set to 127.0.0.1, which binds to the localhost network interface.This means that the mongod can only accept connections from clients that are running on the same machine. Remote clients will not be able to connect to the mongod, and the mongod will not be able to initialize a replica set unless this value is set to a. It really took me two days to figure this out but I think it should be simpler. Here are the step by step instructions to install Mongo on Mac. I will add the instructions for Windows installation shortly. Download MongoDB from here. On Mac, it will download into the Downloads folder. Move it to your desired location and unzip it.
Download And Install Mongodb On Mac Os
It really took me two days to figure this out but I think it should be simpler. Here are the step by step instructions to install Mongo on Mac. I will add the instructions for Windows installation shortly.
Download And Install Mongodb On Mac Catalina
Download MongoDB from here.
On Mac, it will download into the Downloads folder. Move it to your desired location and unzip it.
Set the path to the PATH variable in terminal using this command
Make sure this PATH is set correctly by typing echo $PATH in the terminal.
Once this is set, close the Terminal and reopen it.
At the prompt type mkdir -p /data/db
Go to the mongo install folder, traverse into bin folder and type ./mongod at the prompt.
Usually this will start the database. But sometimes, this will happen.
What the above message is trying to say is that it is unable to start the database on port 27017, which is the default port for MongoDB.
To verify if another instance of MongoDB is running, type the following command at the terminal
You should see something like
As shown above, the mongodb is running and its PID is 10802.
So at terminal prompt, type kill -9 10802
Repeat the step 7 and that should bring up the MongoDB.
Also I am in love with this amazing tool RoboMongo and you can get this from here.
I will post using the RoboMongo in the coming posts. Happy mongoing.:)