On this page Show
This page outlines common connection issues and possible resolutions. To learn more about connecting to an Atlas cluster, see the Get Started with Atlas tutorial. NoteNoteYour database deployment's Connect button may be disabled if your database deployment is in the provisioning state. Your database deployment needs to provision when it is first deployed. Clusters also must provision when you scaled them up or down. The provisoning process can take up to 10 minutes, after which the Connect button will become enabled. Before connecting to your Atlas database deployment, check that you added your host's IP address to the IP access list for your database deployment's project. Atlas allows client connections only from IP addresses and CIDR address ranges in the IP access list. To connect to Atlas, you must authenticate with a MongoDB database user. To create a database user for your database deployment, see Configure Database Users. If you have created a user and are having trouble authenticating, try the following:
Atlas sets limits for concurrent incoming connections to a database deployment. For clusters, this is based on the cluster tier. If you try to connect when you are at this limit, MongoDB displays an error stating For a detailed comparision of cluster tiers and their maximum concurrent connections, see Connection Limits and Cluster Tier.
To learn how to fix this issue, see Fix Connection Issues. Atlas database deployments operate on port
You can check your ability to reach a port using the third-party Outgoing port tester. ExampleIf you can't access these ports, check your system firewall settings and ensure that they are not blocking access to these ports. If you are using a NoteAtlas automatically pauses idle If you use MongoDB Compass to connect to your cluster and experience issues, see:
If you use a self-managed X.509 certificate or an auto-generated X.509 certificate managed by Atlas to authenticate to the MongoDB database, when you connect to MongoDB Compass, you must:
To learn more, see Connect to MongoDB in the MongoDB Compass documentation. The connection string format you use to connect to Atlas depends on several factors, including:
Verify your connection string in a test environment before putting it into production. If your password includes special characters, and you are using your password in a connection string URI, encode the special characters. NoteThe following characters must be converted using percent encoding if included in a username or password: For example, if your password in plain-text is ➤ Use the Select your language drop-down menu to set the language of the encoding example in this section. ImportantDo not encode
special characters in your password if you are using your password outside of a connection string URI (for example, pasting it into If you see this error message, your driver is likely out of date. For instructions on updating your driver, refer to your specific Driver Documentation. When you use the DNS seed list connection string format to connect to Atlas, you might see the following error:
This error may occur when using the default DNS server that your ISP provides. That DNS server might not support SRV lookups that the DNS seed list connection string format uses. To resolve the issue, you can try changing your DNS configuration to use a public DNS server. ExampleAfter you update your network settings to use a public DNS server, connect to the database deployment. If running Ubuntu 18.04 and using the DNS seed list connection string format
(
If so, use one of the following connection options instead:
When using the
DNS seed list connection string format (
To remedy this issue, use the Standard Connection String format with Compass or that driver. With Compass, don't set the SRV Record value, set the Hostname and Port values instead. How do I connect to MongoDB?How to connect to MongoDB. Create database on MongoDB. Connect to MongoDB shell. Create "testdb" database. Create "user" collection and insert it to "testdb".. User Settings. Connect to admin db. Create user administrator. ... . Create connection to MongoDB on CPD. Set the required information.. How do I find my MongoDB connection string?To obtain the connection string for an Atlas cluster:. Navigate to your Atlas Clusters view.. Click Connect for your desired cluster.. Click Connect with MongoDB Compass.. Copy the provided connection string.. How does MongoDB connect to IP address?Enable MongoDB Auth
In the same config file, go to the network interfaces section and change the bindIp from 127.0. 0.1 to 0.0. 0.0 which means allow connections from all ip addresses. Now save and exit the config file and restart mongodb server.
How do I know if MongoDB is running?To determine whether or not MongoDB is installed, perform the steps outlined below.. Open command prompt.. Go to the mongod.exe file in the bin folder. Copy C:\Program Files\MongoDB\Server\4.0\bin>. Now, start the MongoDB server using the mongo command. Copy C:\Program Files\MongoDB\Server\4.0\bin>mongo.. |