Docs Menu

Docs HomeStart with Guides

Get Connection String

In this guide, you will retrieve your database deployment's connection string.

  • Add your IP address to the allowlist to allow access to your Atlas cluster.

  • Locate your connection string and copy it.

Time required: 15 minutes

  • A MongoDB account. See Sign Up for a MongoDB Account.

  • An Atlas cluster. See Create a New Cluster.

  • A MongoDB user. See Configure MongoDB Users in the Atlas documentation.

1
2

Click the Connect button on the cluster management panel. The following Atlas screenshot shows the Connect button:

sample-data-cluster
3

In the Choose your connection method step in the modal, select the button marked Connect Your Application.

The following Atlas screenshot shows the connection option buttons:

connection-string

Follow the instructions for your driver language and version.

If you have successfully completed this guide, you have retrieved your database deployment's connection string in your copy buffer.

What's Next
Add a MongoDB Driver
5 mins

View and install one of the MongoDB drivers we cover in our guides.

Start Guide
Chapter 2
CRUD
  • Add a MongoDB Driver
  • Read Data in MongoDB
  • Read Data from MongoDB With Queries
  • Read Data using Operators and Compound Queries
  • Insert Data into MongoDB
  • Update Data in MongoDB
  • Delete Data from MongoDB
Share Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.