Connecting to a MongoDB Database Using the MongoDB Shell
Learn how to connect to MongoDB databases by using a connection string and the MongoDB Shell, an environment for interacting with MongoDB deployments.
Unit Overview
In this unit, you'll learn how to connect to a MongoDB database by using the MongoDB Shell, an environment for interacting with your MongoDB deployments in Atlas, locally, or on another remote source. First, you'll learn where to find your connection string in Atlas so that you can connect to your cluster. You'll also learn the components of a connection string. Then, you'll learn how to install and connect to the MongoDB Shell, as well as troubleshoot common connection errors. Finally, you'll learn some basics of using the MongoDB Shell, such as inserting and retrieving documents, running JavaScript functions, and switching between databases.
Lessons in This Unit
Lesson 01: Using MongoDB Connection Strings
Lesson 02: Installing and Connecting to the MongoDB Shell
Lesson 03: Troubleshooting Connection Errors
Lesson 04: Using the MongoDB Shell
-
01.Lesson 1: Using MongoDB Connection Strings
- Learn
- Practice
-
02.Lesson 2: Installing and Connecting to the MongoDB Shell
- Learn
- Practice
-
03.Lesson 3: Troubleshooting Connection Errors
- Learn
- Practice
-
04.Lesson 4: Using the MongoDB Shell
- Learn
- Practice
-
05.Conclusion
- Learn

Sequoyha Pelletier | Senior Technologist
Sequoyha Pelletier is a Senior Technologist at MongoDB, bringing over 15 years of experience in technical curriculum development and delivery. Before joining MongoDB, he worked in the Worldwide Support team for DataStax, eventually leading the curriculum team for new hire onboarding.
Sequoyha is extremely passionate about providing quality education for free to those in need and enjoys pushing the boundaries of what is considered "normal" practices with delivering educational content.

Manuel Fontan Garcia | Senior Technologist
Manuel is a Senior Technologist on the Curriculum team at MongoDB. Previously he was a Senior Technical Services Engineer in the Core team at MongoDB. In between Manuel worked as a database reliability engineer at Slack for a little over 2 years and then for Cognite until he re-joined MongoDB. With over 15 years experience in software development and distributed systems, he is naturally curious and holds a Telecommunications Engineering MSc from Vigo University (Spain) and a Free and Open Source Software MSc from Rey Juan Carlos University (Spain).

Julianna Chen | Senior Curriculum Engineer
Julianna is a Senior Curriculum Engineer on the Education team, based in Vancouver, Canada. She’s developed educational content at universities and non-profits for over ten years, and is passionate about supporting access to quality technical education worldwide.

Sarah Evans | Senior Curriculum Engineer
Sarah is a Senior Curriculum Engineer on the Curriculum team at MongoDB. Prior to MongoDB, she taught and developed curricula for developer bootcamps. Sarah has a MAT degree from Columbia University Teachers College and studied Software Engineering at Flatiron School in Chicago, IL.

John McCambridge | University Curriculum Engineer
John is a Curriculum Engineer on the University team at MongoDB. Before his work as a Curriculum Engineer, he was an instructor and teaching assistant for coding boot camps at UT (Austin), and UCLA. Additionally, he worked as a QA engineer for a startup called Coder and spent five years at Apple Inc. John is a passionate software engineer and educator who enjoys taking complex topics and making them digestible for the community.

Rajan Santhanam | Senior Technologist
Rajan Santhanam is a Senior Technologist on the curriculum team at MongoDB. He worked as a Technical Support engineer before switching to the curriculum team. He is an expert of Oracle RAC and Oracle database and has deep understanding of database design. He has also worked in startups such as Cloudera and Streamsets and has a good knowledge of hadoop and kafka.

Colleen Day | Curriculum Designer
Colleen is a Curriculum Designer at MongoDB. She holds a Masters degree in English literature from NYU, and is passionate about using writing as a vehicle to teach. She has worked as a writing instructor and ghostwriter, and has spent her career focused on educational content development. For several years, Colleen was the lead editor for The Princeton Review’s “Cracking the SAT” and other test prep books. Prior to MongoDB, she was Senior Managing Editor for boot camp courses on data science and fintech, partnering with subject matter experts to design and deliver courses for learners of all levels.

Emily Pope | Lead Curriculum Designer
Emily Pope is a Lead Curriculum Designer at MongoDB. She loves learning and loves making it easy for others to learn how and when to use deeply technical products. Recently, she's been creating AI and vector search content for MongoDB University. Before that, she's created learning experiences on databases, computer science, full stack development, and even clinical trial design and analysis. Emily holds an Ed.M. in International Education Policy from Harvard Graduate School of Education and began her career as an English teacher in Turkiye with the Fulbright program.

Daniel Curran | Senior Curriculum Designer
Daniel is a Senior Curriculum Designer at MongoDB. Before joining MongoDB, he worked as an Instructional Designer and Content Developer specialising in technical content for a host of international clients. Daniel's goal is to remove obstacles so learners can feel confident on their journey to become masters of MongoDB.

Davenson Lombard | Senior Software Engineer
Davenson Lombard is a Senior Software engineer at MongoDB on the Education Team. Prior to that, Davenson was a Technical Services Engineer at MongoDB and a Customer Success architect at Confluent. Davenson holds a Bachelor in Electrical Engineering from Concordia University in Montreal.