Home > Software engineering >  Prisma - The provided database string is invalid. MongoDB connection string error
Prisma - The provided database string is invalid. MongoDB connection string error

Time:10-12

I'm being told I have an invalid connection string for my MongoDB data provider.

Specifically, I'm getting this: The provided database string is invalid. MongoDB connection string error: Missing delimiting slash between hosts and options in database URL.

My problem, however, is that my connection string does have a delimiting slash: it's this: mongodb://<user>:<pass>@cluster0.<server>.mongodb.net/?retryWrites=true&w=majority

What's going on? Is there anything I'm missing?

CodePudding user response:

It's missing database name after host: mongodb://<user>:<pass>@cluster0.<server>.mongodb.net/<mydb>?retryWrites=true&w=majority

  • Related