Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 459
alilland Avatar asked Jun 07 '17 21:06

alilland


2 Answers

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

like image 118
Samip Suwal Avatar answered Sep 29 '22 10:09

Samip Suwal


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.

like image 42
Adam Harrison Avatar answered Sep 29 '22 09:09

Adam Harrison