Docs Home → Start with Guides Show In this guide, you will retrieve your database deployment's connection string.
Time required: 15 minutes
Click the Connect button on the cluster management panel. The following Atlas screenshot shows the Connect button: 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: 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. Docs Home → MongoDB Atlas Atlas does not guarantee that host names remain consistent with respect to node types during topology changes. ExampleIf you have a cluster named To access a database deployment, you must connect from an IP address on the Atlas project's IP access list. If you need to add an IP address to the IP access list, you can do so in the Connect dialog. You can also add the IP address from the Network Access tab. To access a database deployment, you must create a database user with access to the desired database(s) on your Atlas database deployment. Database users are separate from Atlas users. Database users have access to MongoDB databases, while Atlas users have access to the Atlas application itself. You can create a database user to access your Atlas database deployment in the Connect dialog. You can also add the database user from the Database Deployment view. Make sure your application can reach your MongoDB Atlas environment. To add the inbound network access from your application environment to Atlas, do one of the following:
TipSee also:If your firewall blocks outbound network connections, you must also open outbound access from your application environment to Atlas. You must configure your firewall to allow your applications to make outbound connections to ports 27015 to 27017 to TCP traffic on Atlas hosts. This grants your applications access to databases stored on Atlas. NoteBy default, MongoDB Atlas clusters do not need to be able to initiate connections to your application environments. If you wish to enable Atlas clusters with LDAP authentication and authorization, you must allow network access from Atlas clusters directly to your secure LDAP. You can allow access to your LDAP by using public or private IPs as long as a public DNS hostname points to an IP that the Atlas clusters can access. If you are not using VPC / VNet peering and plan to connect to Atlas using public IP addresses, see the following pages for additional information:
NoteIf you are experiencing issues connecting to your database deployment, see Troubleshoot Connection Issues. TipSee also:
How do I find my MongoDB URL?Find MongoDB URI
Click on “Overview” tab in the menu bar. Scroll down the Overview page and you will see the MongoDB URI information.
What is the URL of MongoDB connectivity?connect('mongodb://localhost:27017/myapp'); This is the minimum needed to connect the myapp database running locally on the default port (27017). If connecting fails on your machine, try using 127.0. 0.1 instead of localhost .
Where is Atlas connection string?Atlas provides multiple connection strings.. Toggle the Using Custom DNS on AWS with VPC Peering on On from the Project Settings menu.. View the connect modal for your AWS Cluster.. Select the Private IP for Peering connection string.. How do I connect to Atlas cluster?You'll need to get your cluster's connection string from Atlas to connect to the cluster using the PyMongo driver.. Click Connect. ... . Click Choose a connection method.. Click Connect your application. ... . Select Python and your version of the driver. ... . Copy the provided connection string.. Configure the provided connection string.. |