10

I have been a mongochef user for a while, and setting up URI connections with mongochef is super easy. However this is not the case with robomongo.

How would someone connect their MLAB mongodb database to robobongo when MLAB uses string URI's to connect users to their databases?

in the configuration setup for robomongo it looks like it favors ip addresses and ports as the connection method and does not provide a URI format

Community
  • 1
  • 1
alilland
  • 881
  • 11
  • 29

2 Answers2

44

lets say you have following uri

mongodb://<dbuser>:<dbpassword>@ds111111.mlab.com:55191/<dbName>

where dbuser and dbpassword are users for the database.

In robomongo, in the Connection tab enter following in the Address box:

ds111111.mlab.com 

and for the port box

55191

Go to the Authentication tab. Click on 'Perform authentication'. Enter database name, username, and password . Let the auth mechanism be SCRAM-SHA-1

Here are some snapshots

Connection tab

enter image description here

Samip Suwal
  • 1,188
  • 9
  • 16
  • This didn't work for me. I'm able to connect fine via Mongoose, but when I try to use Robo 3T with the settings above I get a failed connection error. If I fill in the address bar with .mlab.com:/ then the connection succeeds but I still haven't managed to authorize. If I'm able to connect successfully I'll add an answer. – Matt West Jul 10 '18 at 19:49
  • If you get stuck on this, as I did, you may have to disable HTTPS / SSL connections to connect to mLabs using Robo 3t – DrewT Apr 04 '19 at 23:29
  • @DrewT, Thank you this solved my problem – Snoopy May 08 '19 at 13:18
  • adding to @Sampil Suwal answer, Please make sure that you have given DB access to the user. Check it by going to your DB in mLab and check Database Users list. – Basavaraj Hadimani May 20 '19 at 18:21
2

Connecting via Robomongo should just be a matter of extracting the relevant hostname and port from the MongoDB connection string URI.

For example, if the connection string were:

mongodb://r1.example.net:27017,r2.example.net:27017/testdb

then the hostname could be r1.example.net or r2.example.net with a port value of 27017 and a database name of testdb.

Adam Harrison
  • 2,915
  • 2
  • 14
  • 24