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

3

5

How can I add and connect to this Atlas Cluster from Mongo Explorer?:

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: I need to add and run this from Mongo Explorer (Plugin for IntelliJ IDEA) not from shell.

github.com/dboissier/mongo4idea

Boozy answered 20/6, 2018 at 13:12 Comment(1)
hi @Yellowfun, I have added the valid connection string to connect to your mongodb deployments as answer. However, it is not recommended to share your DB credentials in the community. Please change the username and passwords of this deploymentHijacker
B
9

Add a new server as on the image:

enter image description here

  • Server 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: checked
  • User Database: aggregations

Then go to Authentication tab and set credentials:

enter image description here

  • Username: m121
  • Password: aggregations
  • Auth. database: admin
  • Auth. mechanism: SCRAM-SHA-1
Bitterroot answered 26/6, 2018 at 12:39 Comment(2)
I've tested out and it is working! Thank you very much! @Alex BlexBoozy
Hey @Yellowfun, you forgot to reset the password. It is violation of Atlas' T&C. Please do it now, even if you have nothing to hide there. Your cluster is wide open to anyone in the internet - it can be misused, and you are the one to blame: You are responsible for all activities that occur under your account, regardless of whether undertaken by youBitterroot
H
1

@Yellowfun: Try this with mongo shell:

mongo --host "mongodb://m121:[email protected]: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
  • Server 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 connection
  • In Authentication settings:
    • Username: m121
    • Password: aggregations
    • Auth.database: admin
    • Authe mechanism: Default
  • User database: aggregations
Hijacker answered 23/6, 2018 at 14:38 Comment(12)
Hi @Astro! I need to add and run this from Mongo Explorer (Plugin for IntelliJ IDEA) not from shell. plugins.jetbrains.com/plugin/7141-mongo-pluginBoozy
Are you able to open a window in intellij from Mongo explorer to 'Add a mongo Server' ?Hijacker
Updated answer for Mongo Explorer and fields to be added in Add a mongo server. Check if that helpsHijacker
Thank you! But Connectoin Test Failed - For input string: "//cluster0-shard-00-00-jxeqq.mongodb.net"Boozy
are you using same mongo shell version as that of your server: 3.6.5 ?Hijacker
My MongoDB shell is v3.6.4Boozy
But it's working from cmd shell (with v3.6.4 ) why it's not working from plugin?Boozy
not sure if this is issue with connector. You can check if there are any know issue noted or you can create one.Hijacker
3.6.4 should be good enough. You can get it from here: mongodb.com/download-center?#community and set pathHijacker
I've also created here an issue github.com/dboissier/mongo4idea/issues/215 but no one is answering. I think it is not support the clusters. @AstroBoozy
Maybe you know some good shell for mongoDB maybe even with integration with IntelliJ IDEA? @ AstroBoozy
I would recommend using mongo shell if you want to interact with Altas cluster. :)Hijacker
B
-1

I think this can help you (use in in Mongo Shell)

mongo "mongodb://username:[email protected]:27017,cluster-shard-00-01-6666.mongodb.net:27017,cluster-shard-00-02-6666.mongodb.net:27017/databaseName?ssl=true&replicaSet=replicaName&authSource=admin"

Boanerges answered 23/6, 2018 at 15:6 Comment(1)
github.com/dboissier/mongo4idea Mongo Explorer is a Plugin for IntelliJ IDEABoozy

© 2022 - 2024 — McMap. All rights reserved.