How to connect aws VM running mongo DB to robomongo on windows machine?

hardik dave picture hardik dave · May 15, 2015 · Viewed 7.1k times · Source

I am trying to access my mongodb databases which are running on VM on amazonaws. I am trying to connect through robomongo. Getting can not connect.

I have checked that mongoDB listening to 27017 and commented bind_ip = 0.0.0.0 to #bind_ip = 0.0.0.0 in mongodb.conf in /etc/mongodb.conf

Answer

efkan picture efkan · May 15, 2015

If your MongoDB version pre-3.0, so your MongoDB uses MONGODB-CR Authentication then you can use Robomongo today. Otherwise RoboMongo cannot be used yet. (2015-05-16) Because MongoDB 3.0 uses SCRAM-SHA-1 credentials. (https://github.com/paralect/robomongo/issues/766)

To Connect MongoDB 2.6 and Earlier Versions Using Robomongo Directives;

  1. Open mongod.conf file using sudo nano /etc/mongod.conf command. Then mark as comment line port line like the following;

    # port = 27017

    Use CTRL + X to save file and exit.

  2. Create a user that will be used on RoboMongo

    db.createUser({ user: "admin", pwd: "GiveASecretPassword", roles: [{ role: "clusterAdmin", db: "admin" }, { role: "readWrite", db: "config" }]})

  3. Allow port 27017 on Security Groups page on your EC2 console.

enter image description here

  1. Create a new connection on RoboMongo

enter image description here enter image description here