当 MLAB 仅提供字符串 URI 时,如何将他们的 MLAB mongodb 数据库连接到 robomongo

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

我使用 mongochef 已有一段时间,使用 mongochef 设置 URI 连接非常简单。然而,robomongo 并非如此。

当 MLAB 使用字符串 URI 将用户连接到他们的数据库时,人们如何将他们的 MLAB mongodb 数据库连接到 robobongo?

在 robomongo 的配置设置中,它似乎倾向于将 IP 地址和端口作为连接方法,并且不提供 URI 格式

通过 Robomongo 连接应该只是从 MongoDB connection string URI.

中提取相关主机名和端口的问题

例如,如果连接字符串是:

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

那么主机名可以是 r1.example.netr2.example.net,端口值为 27017,数据库名称为 testdb

假设您有以下 uri

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

其中 dbuser 和 dbpassword 是数据库的用户。

在 robomongo 中,在 Connection 选项卡的地址框中输入以下内容:

ds111111.mlab.com 

和端口框

55191

转到身份验证 选项卡。点击 'Perform authentication'。输入数据库名称、用户名和密码。让认证机制为 SCRAM-SHA-1

这是一些快照