且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用Robomongo连接到MongoDB Atlas?

更新时间:2022-05-28 09:11:27

1)(Atlas Mongodb控制台)首先单击允许从任何地方访问(如下图所示)并随机放置一些IP地址,请不要点击添加当前IP地址,否则它将无法与robomongo连接.

1) (Atlas Mongodb console)First of all click on ALLOW ACCESS FROM ANYWHERE(see in below image) and put some random IP address , don't click on Add Current IP Address otherwise it will not connect with robomongo .

2)现在打开robomongo,选择connection选项卡,然后选择Type Direct Connection,然后将您的主群集放入地址[您可以从Project-> Clusters->(选择)Primary Cluster->那里获得您的主群集地址"您将找到您的主群集地址"].

2) Now open robomongo ,select connection Tab and then select type Direct Connection , and put your primary cluster in Address [you can get your Primary Cluster Address from Project->Clusters->(choose) Primary Cluster-> "There you will find your Primary Cluster Address"] .

3)现在单击身份验证"选项卡,输入数据库名称为admin并输入您的用户名和密码,身份验证机制"为SCRAM-SHA-1.

3)now click on Authentication Tab , put database name is admin and put your username and password , Auth Mechanism is SCRAM-SHA-1.

4)选择自签名证书作为身份验证方法

4) select self-signed certificate as Authentication Method

5)现在,单击测试,我们完成了!

5) Now , click on test,we are done !

标准的Mongo URI连接模式的格式为:

The standard Mongo URI connection schema has the form:

 mongodb://[username:password@]host1[:port1][,...hostN[:portN]]][/[database][?options]]

安全原因

  1. 出于安全原因,不允许在任何地方访问
  2. 限制您的IP地址
  3. 使用MongoDB Atlas中的辅助群集节点通过roboMongo 3T连接