Search code examples
javascriptnode.jsmongodbubuntumeteor

Access mongodb by Robomongo in Virtualbox hosted Ubuntu


I am trying to access Mongodb in the virtualbox hosted Ubuntu. When I am developing app in Ubuntu, I used "meteor create {app_name}"

I didnt change the default Mongodb. So when I am running Meteor app using "meteor" command, I cant access the mongodb.

In my Robomongo app in Windows, I am using this credentials,

"192.168.1.13:3001" as host and port. But It says "failed to connect".

What Do i need to do to connect to my mongodb?


Solution

  • Hey After doing some digging I find out the solution.

    steps you need to follow:

    1. Go to the following path cd /etc
    2. There you will find a file called mongod.conf open this file with the help of

    sudo vim mongod.conf

    3.You will be in a file type i and find bindIp written over there.

    4.now you need to change your bindIp of mongodb to 0.0.0.0

    5.type ctrl +c then :wq // write and quite

    6.sudo service mongod restart

    7.Go to your robomongo and create connection and in address field just type your ip (192.168.1.13) // no port number is required in which you are running the code port will be default port on which mongodb runs 27017