Closed crunk1 closed 6 months ago
Hello it seems like there is an authentication problem.
Can you create a new user that has readWrite permission on bridge database. readWrite@bridge
Then try to connect without readPreferences and ssl options. Then try both connection strings given below.
mongodb+srv://<new-user>:<password>@cluster0.ocays.mongodb.net/bridge
mongodb+srv://<new-user>:<password>@cluster0.ocays.mongodb.net/bridge?authSource=admin
Sometimes authentication method should be added to connection string like below. (SCRAM-SHA-1, SCRAM-SHA-256, MONGODB-CR). Also try both connection strings.
mongodb+srv://<new-user>:<password>@cluster0.ocays.mongodb.net/bridge?authMechanism=SCRAM-SHA-1
mongodb+srv://<new-user>:<password>@cluster0.ocays.mongodb.net/bridge?authSource=admin&authMechanism=SCRAM-SHA-1
I will be waiting for your reply.
I was able to connect, thank you. Some notes:
dbAdminAnyDatabase@admin
, I didn't need to create a user with readWrite@bridge
mongodb+srv://<user>:<pw>@cluster0.ocays.mongodb.net/bridge?authSource=admin&authMechanism=SCRAM-SHA-1&replicaSet=<rs>
I'm pretty sure I tried authMechanism before, but I didn't try authMechanism AND replicaSet at the same time.
Hi there! I'm trying out your app and I'm running into an issue. I'm trying to connect to my Atlas cluster with the following connection string:
mongodb+srv://<my user>:<my pw>@cluster0.ocays.mongodb.net/bridge?authSource=admin&replicaSet=<my rs>&readPreference=primary&ssl=true
This connection string works in Compass. It does not work in your app. Note, the db name is
bridge
andauthSource=admin
. If I changebridge
toadmin
, I can connect, but then I'm only seeing theadmin
db.Also, a bit redundant information, but my user has the role
dbAdminAnyDatabase@admin
in Atlas.Anything I'm doing wrong?