Multi hostname MongoDB connection string is not supported by Prisma Client #11873
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
team/schema
Issue for team Schema.
topic: connection-url
topic: mongodb
Milestone
MongoDB has a specific connection string format for replica set / sharded setups which lists the hosts explicitly:
mongodb://user:password@my-shard-00.atlas.mongodb.net:27017,my-shard-01.atlas.mongodb.net:27017,my-shard-02.atlas.mongodb.net:27017/database?ssl=true&replicaSet=atlas-xxxxx-shard-0&authSource=admin&retryWrites=true
This is part of the MongoDB specification:
mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]
(via Standard Connection String Format)
(The listing of the individual hosts can be avoided by using the "DNS Seed List Connection Format", which uses
mongodb+srv://
instead and then executes some logic to get the individual hosts)Currently you can not use Prisma with this format.
Preproduction
This from
DEBUG="*" npx prisma db pull
CLIand for the client
The text was updated successfully, but these errors were encountered: