无法在Mongo Explorer中添加服务器(Atlas群集)

时间:2018-06-20 13:12:12

标签: mongodb cluster-computing explorer atlas

如何从 Mongo Explorer 添加并连接到此 Atlas集群?:

mongo "mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/aggregations?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl -u m121 -p aggregations --norc

PS:我需要从Mongo Explorer(用于IntelliJ IDEA的插件)而不是从Shell添加并运行它。

github.com/dboissier/mongo4idea

3 个答案:

答案 0 :(得分:6)

添加新服务器,如图所示:

enter image description here

  • 服务器网址:cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017
  • SSL:已选中
  • 用户数据库:aggregations

然后转到“身份验证”标签并设置凭据:

enter image description here

  • 用户名:m121
  • 密码:aggregations
  • 验证。数据库:admin
  • 验证。机制:SCRAM-SHA-1

答案 1 :(得分:1)

@Yellowfun: 试试用mongo shell:

mongo --host "mongodb://m121:aggregations@cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/aggregations?replicaSet=Cluster0-shard-0&ssl=true&authSource=admin
  • 服务器网址:mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017?replicaSet=Cluster0-shard-0
  • 选择SSL连接
  • 在“身份验证”设置中:
    • 用户名:m121
    • 密码:aggregations
    • Auth.database:管理员
    • 授权机制:默认
  • 用户数据库:聚合

答案 2 :(得分:-1)

我认为这可以为您提供帮助(在Mongo Shell中使用)

mongo“ mongodb:// username:password@cluster-shard-00-00-6666.mongodb.net:27017,cluster-shard-00-01-6666.mongodb.net:27017,cluster-shard-00 -02-6666.mongodb.net:27017/databaseName?ssl=true&replicaSet=replicaName&authSource=admin“

相关问题