mongodb-backup icon indicating copy to clipboard operation
mongodb-backup copied to clipboard

Unable to take back for this kind of URI as it from mongodb atlas, please help

Open akhilesh2310 opened this issue 5 years ago • 2 comments

mongodb+srv://username:[email protected]/dbName?retryWrites=true&w=majority

Getting the following error:

{ "message": "invalid schema, expected mongodb", "error": {}, "title": "ERROR" }

I tried with mongodb lab url string and it worked but with this not working

akhilesh2310 avatar Jul 22 '20 12:07 akhilesh2310

take a look at the documentation: https://docs.mongodb.com/manual/reference/connection-string/

this should be the format: mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]

lihaibh avatar Sep 07 '20 03:09 lihaibh

Hello @akhilesh2310, I had a similar problem where 'mongodb+srv' was the problem. I solved it by going to atlas configuration for the cluster and from there you click on "connect" and choose "connect from application" and choose the older version of the driver where it contains only "mongodb://" without" mongodb+srv:\".

Hope this helps.

sujed avatar Sep 30 '20 01:09 sujed