How can I connect to an Atlas server?

To connect to ATLAS you would use the URI provided in your ATLAS configuration screen.  So for instance,  I created a free tier Atlas cluster,  On the CONNECT button, Atlas provides me with the current connection options:

While we could connect using the full URI specified in this dialogue, this is bad practice because the password will be stored in plain text within the connection string.  So instead, we take the URI supplied to the mongo shell.  If we press COPY as highlighted above, we get a full string that looks like this:

mongo "mongodb://cluster0-shard-00-00-d1gru.mongodb.net:27017,cluster0-shard-00-01-d1gru.mongodb.net:27017,cluster0-shard-00-02-d1gru.mongodb.net:27017/test?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl --username admin --password

We supply the URI from that string ONLY to the URI in the Create New Connection dialogue.  This is 

 mongodb://cluster0-shard-00-00-d1gru.mongodb.net:27017,cluster0-shard-00-01-d1gru.mongodb.net:27017,cluster0-shard-00-02-d1gru.mongodb.net:27017/test?replicaSet=Cluster0-shard-0 

We check the SSL box, and add the username and password in the SCRAM-SHA-1 authentication section:

 

Check the "SSL" box and enter the username and password in the SCRAM-SHA-1 authentication box.  Press connect and you should connect to your Atlas cluster. 

Note:  Make sure you set your IP whitelist so that Atlas is available from the host from which you are running dbKoda.   

Is article helpful?