Question

Error add new connection/users in mongodb compass

Hello, I have a MongoDB setup with DigitalOcean with my admin connection in MongoDB Compass. I tried to add a new user I’m working with. We added him correctly to the team users on DigitalOcean and to the trusted sources of the database. We tried using the connection string with the new user or even with the admin, but we still get this error in MongoDB Compass: connect ETIMEDOUT xxx.xxx.xx.xx:xxxxx

What should i do ? Thank you.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
May 2, 2025

Hey @antoineClam,

The ETIMEDOUT error means MongoDB Compass can’t reach the database server at all, which isn’t probably related to credentials.

You need to make sure the IP address you’re connecting from is added to the Trusted Sources in your database settings on DigitalOcean.

If you’re on a network that restricts outbound traffic (like some office or VPN setups), try from a different network or even a hotspot from your phone to test.

Also, double-check the port in the connection string, for MongoDB it’s usually 27017, unless your string says otherwise.

If all that looks good and you still can’t connect, it’s probably worth reaching out to support so they can confirm things are ok on their end: https://do.co/support

Let us know how it goes!

- Bobby

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.