How to connect to one-click MEAN stack Mongo DB from Robomongo

July 31, 2015 9.2k views
MongoDB Ubuntu Node.js Networking One-Click Install Apps MEAN

I’ve got the MEAN stack droplet one-click image up and running, and I’d like to connect to that database via Robomongo to look at it in a GUI, but Robomongo keeps giving me errors that it can’t connect to the server. it doesn’t even make it to the authentication stage.

I’m pointing Robomongo to <my droplet’s IP>:27017, which has always worked for services like MongoLab.

2 comments
1 Answer

I ended up discovering that the answer is to edit your etc/mongod.conf file’s bind_ip variable to include the IP of the computer you’re using, or eliminate it altogether.

  • can you also post your sample robomongo configuration please?

    what will be the url to connect to mondb instance in DigitalOcean from robomongo?

    • I was able to connect using the following mongod.conf , I commented out bind_ip and uncommented port.

      # mongod.conf
      
      # Where to store the data.
      
      # Note: if you run mongodb as a non-root user (recommended) you may
      # need to create and set permissions for this directory manually,
      # e.g., if the parent directory isn't mutable by the mongodb user.
      dbpath=/var/lib/mongodb
      
      #where to log
      logpath=/var/log/mongodb/mongod.log
      
      logappend=true
      
      port = 27017
      
      # Listen to local interface only. Comment out to listen on all interfaces. 
      #bind_ip = 127.0.0.1
      
      # Disables write-ahead journaling
      # nojournal = true
      
      # Enables periodic logging of CPU utilization and I/O wait
      #cpu = true
      
      # Turn on/off security.  Off is currently the default
      #noauth = true
      #auth = true
      
      # Verbose logging output.
      #verbose = true
      
      # Inspect all client data for validity on receipt (useful for
      # developing drivers)
      #objcheck = true
      
      # Enable db quota management
      #quota = true
      
      # Set oplogging level where n is
      #   0=off (default)
      #   1=W
      #   2=R
      #   3=both
      #   7=W+some reads
      #diaglog = 0
      
      # Ignore query hints
      #nohints = true
      
      # Enable the HTTP interface (Defaults to port 28017).
      #httpinterface = true
      
      # Turns off server-side scripting.  This will result in greatly limited
      # functionality
      #noscripting = true
      
      # Turns off table scans.  Any query that would do a table scan fails.
      #notablescan = true
      
      # Disable data file preallocation.
      #noprealloc = true
      
      # Specify .ns file size for new databases.
      # nssize = <size>
      
      # Replication Options
      
      # in replicated mongo databases, specify the replica set name here
      #replSet=setname
      # maximum size in megabytes for replication operation log
      #oplogSize=1024
      # path to a key file storing authentication info for connections
      # between replica set members
      #keyFile=/path/to/keyfile
      

      Don’t forget to restart mongod service before trying to connect:

      service mongod restart
      

      From robomongo I used the following connection settings:

      Connection Tab:

      Address: <VPS IP> : 27017

      SSH Tab:

      SSH Address: <VPS IP> : 22
      SSH User Name: <Username for sudo enabled user>
      SSH Auth Method: Password
      User Password: Supersecret

      • nice. its work for me if only if , inside authentication tab of robo mongo, i unchecked perform authentication. I am using robomongo 0.9 .So authentication failed for me. Otherwise it is saying authentication failure. I donot have any ssh tab. I have authentication tab.
        Where there are 4 input fields. such as Database(I give project database name), User Name(I give root user name without any ’<’ Or ’>’ ) , Password (I give root password) and Auth mechanism (I tried with both available mechanism)

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!