Skip to content

Commit

Permalink
Added authSource configuration to the "Start from Scratch" section fo…
Browse files Browse the repository at this point in the history
…r MongoDB. (#6231)

* Update 100-connect-your-database-typescript-mongodb.mdx

Added authSource in start from scratch section of MongoDB

* Update MongoDB connection string to include authSource=admin
  • Loading branch information
yash-278 authored Sep 4, 2024
1 parent d474bb0 commit 6370a1a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ Here's a short explanation of each component:
- `HOST`: The host where a [`mongod`](https://docs.mongodb.com/manual/reference/program/mongod/#mongodb-binary-bin.mongod) (or [`mongos`](https://docs.mongodb.com/manual/reference/program/mongos/#mongodb-binary-bin.mongos)) instance is running
- `PORT`: The port where your database server is running (typically `27017` for MongoDB)
- `DATABASE`: The name of the database

If you see the following error: `Error in connector: SCRAM failure: Authentication failed.`, you can specify the source database for the authentication by adding `?authSource=admin` to the end of the connection string. See [this GitHub discussion](https://github.com/prisma/prisma/discussions/9994#discussioncomment-1562283) for additional details.

0 comments on commit 6370a1a

Please sign in to comment.