skip to Main Content

While executing below query under vs code terminal:
PS C:desktopserver> npx prisma db push
Environment variables loaded from .env
Prisma schema loaded from prismaschema.prisma
Datasource "db": MongoDB database "RealPropDB" at "cluster0.kmq4a.mongodb.net"
Applying the following changes:

Error: P1013

The provided database string is invalid. An invalid argument was provided: password must be URL encoded in database URL. Please
refer to the documentation in https://www.prisma.io/docs/reference/database-reference/connection-urls for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters.

2

Answers


  1. Chosen as BEST ANSWER

    I have navigated to the below path under mongodb and updated the database password without using a special character: enter image description here

    then navigate user to here: enter image description here

    Copy this url into your Database_URL path enter image description here


  2. The URL you provided is missing the database reference

    MongoDB URL Schema

    Log into your MongoDB Atlas account, create a new db if you haven’t done so already and update the url to include the appropriate database name.

    mongodb://<user>:<pass>@cluster0.<server>.mongodb.net/<db>?retryWrites=true&w=majority

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search