How would someone connect their MLAB mongodb database to robomongo when MLAB only provides string URI's [duplicate]
Asked Answered
S

2

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

Septicemia answered 7/6, 2017 at 21:1 Comment(1)
And why is that considered a problem? Is it too hard to fill 4 strings instead of 1?Metallize
D
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

Decadent answered 7/6, 2017 at 22:58 Comment(4)
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 <databaseid>.mlab.com:<port>/<database name> then the connection succeeds but I still haven't managed to authorize. If I'm able to connect successfully I'll add an answer.Enneagon
If you get stuck on this, as I did, you may have to disable HTTPS / SSL connections to connect to mLabs using Robo 3tParagrapher
@DrewT, Thank you this solved my problemMastermind
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.Derrik
C
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.

Chromate answered 7/6, 2017 at 22:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.