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
I have navigated to the below path under mongodb and updated the database password without using a special character:
then navigate user to here:
Copy this url into your Database_URL path
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