mongodbmeteorremote-accesscloud9-idedb-schema

JDBC connection to mongodb running on Meteor server on Cloud 9


I have a Meteor app running on Cloud 9 and I would like to connect to MongoDB from a window app that I am in trial period (DBSCHEMA: http://www.dbschema.com/).

Cloud 9 guys told me that I need my DB to listen to 0.0.0.0:8082.

In cloud9 I started my app using command: $ meteor --port $IP:$PORT. I also created a db and user that has role "userAdmin" to this database.

In another terminal, at c9, "Meteor mongo" command give me connecting to: 127.0.0.1:8081/meteor

In DBSchema ping to the server is succesfull, but connection is refused. So, I am trying to change to 0.0.0.0:8082 but I cant figure out how and not sure its going to work.

Any suggestions please?


Solution

  • use environment variable MONGO_URL=your-mongo-server-ip-or-hostname:8082 in meteor and start mongo with port 8082 on 0.0.0.0 with the config file

    http://docs.mongodb.org/manual/reference/configuration-options/

    Ideally, you should not expose you dB to the outside (so not bind to 0.0.0.0 which exposes the DB on all interfaces including the public IP).

    If you want to access it with Robomongo, bind to localhost, and then you should create a ssh tunnel to the server from you local terminal with the command

    ssh -L 8082:localhost:8082 your-host

    then connect to it with robomongo at localhost:8082 –