无法在 Mongo 资源管理器中添加服务器(Atlas 集群)

Can't add server(Atlas Cluster) in Mongo Explorer

如何从 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

@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
  • 服务器url: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
  • Select SSL 连接
  • 在身份验证设置中:
    • 用户名:m121
    • 密码:aggregations
    • Auth.database: 管理员
    • Authe 机制:默认
  • 用户数据库:聚合

我认为这可以帮助你(在 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"

如图所示添加新服务器:

  • 服务器url: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

然后转到身份验证选项卡并设置凭据:

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