

Once you change the bindIp, then you have to restart the mongodb, using the following command sudo service mongod restart The file should contain the following kind of content: systemLog:īindIp: 127.0.0.1 // enter your ip address here If you are running a server version, then you can make use of vi editor command sudo vi /etc/nf

A list of your Collections will be displayed And Thats All Note: Before running your Compass, Make sure your MongoDB is already running in the console by Macaulay Uzu mccauley.

Open /etc/nf file using any of the editor, if you are running a desktop version then you can make use of gedit utility tool sudo gedit /etc/nf Enter the MongoDB connection string ( mongodb://localhost:27017 ) in the connection string field and click connect. The following connects to a replica set with three members running on localhost on ports 27017, 27018, and 27019: mongodb://localhost,localhost:27018. Login to your machine, open mongodb configuration file located at /etc/nf and change the bindIp field to your machine ip address (it is the same ip address which you are using to ssh to your machine), after that restart mongodb server.
