Authentication failed, can't seem to connect to MongoDB

Can someone help me with this? I’m really stuck…
I think there is a problem with MongoDB, I cant seem to connect to the database.

I’m using sublime text to run python code.

I keep getting this error in sublime.

As you’re not showing how you authenticate (hide passwords please) it’s hard to say what went wrong.

i changed the database password to make sure, but it didn’t work.

bad auth means wrong combination of user id & pwd
Are you giving correct username & password?
Can you connect by shell or by other tools like Compass

i tried using google colab but give me error SSL certification. In sublime it gives me error bad auth same goes with python in my local

error in colab:

in sublime and python local :

Have you whitelisted your IP? or allow access from anywhere under Network security in Atlas

sorry, is this what you mean?

Yes
try 0.0.0.0/0 and see if it works or not
Also is your port 27017 open?

1 Like

yes my port 27017 is open. added 0.0.0.0/0 in network access but still doesn’t work… :///

is it possible that the cause of this is I’m using MongoDB online? I did not download it in my computer…

OMG it worked thank you.

i just forgot to remove the < > of credentials in connecting to the db… my bad i didnt know it should be removed haha

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.