From the course: MongoDB Node.js Developer Associate Cert Prep

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Using MongoDB connection strings

Using MongoDB connection strings

- Welcome back team. In this video, you'll learn how to use the MongoDB connection string, where to locate the connection string for an Atlas cluster and what the string consists of. The MongoDB connection string allows us to connect to our cluster and work with our data. It describes the host that we'll be using and the options for connecting to a MongoDB database. For example, the connection string can be used to connect from the Mongo Shell, MongoDB Compass or any other application. MongoDB provides two formats for the connection string: a standard format, and a DNS seed list format. The standard format is used to connect to standalone clusters, replica sets, or sharded clusters. The DNS seed list format was released in MongoDB 3.6. It allows us to provide a DNS server list to our connection string. This gives us a lot more flexibility with our deployment and the ability to change servers in our rotation without…

Contents