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


i trying access mongodb databases running on vm on amazonaws. trying connect through robomongo. getting can not connect.

i have checked mongodb listening 27017 , commented bind_ip = 0.0.0.0 #bind_ip = 0.0.0.0 in mongodb.conf in /etc/mongodb.conf

if mongodb version pre-3.0, mongodb uses mongodb-cr authentication can use robomongo today. otherwise robomongo cannot 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 , earlier versions using robomongo directives;

  1. open mongod.conf file using sudo nano /etc/mongod.conf command. mark comment line port line following;

    # port = 27017

    use ctrl + x save file , exit.

  2. create user 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 ec2 console.

enter image description here

  1. create new connection on robomongo

enter image description here enter image description here


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -