`The provided database string is invalid. Unable to parse URL. in database URL.` on invalid (?) connection string
See original GitHub issueSomething in this connection string seems to be weird, but the error message also does not make sense:
Connection string:
mongodb://localhost:C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==@localhost:10255/e2e-tests?ssl=true
Error message:
D:\a\e2e-tests\e2e-tests\databases-windows\mongodb-azure-cosmosdb-emulator\script.ts:7:21
4
5 // A `main` function so that we can use async/await
6 async function main() {
→ 7 await client.user.deleteMany(
The provided database string is invalid. Unable to parse URL. in database URL. Please refer to the documentation in [prisma.io/docs/reference/database-reference/connection-urls](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.
at cb (D:\a\e2e-tests\e2e-tests\databases-windows\mongodb-azure-cosmosdb-emulator\node_modules\@prisma\client\runtime\index.js:39809:17) {
clientVersion: '3.10.0-dev.54',
errorCode: undefined
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
prisma can't connect to postgresql - Stack Overflow
Make sure that in your DATABASE_URL in the .env file, the special characters in your username and password are replaced with percent-encodings.
Read more >Connection URLs (Reference) - Prisma
The connection URL is provided via the url field of a datasource block in your Prisma schema.
Read more >Troubleshoot Connection Issues — MongoDB Atlas
To connect to Atlas, you must authenticate with a MongoDB database user. ... Incorrect Connection String Format ... 20, uri := "mongodb+srv://" +...
Read more >34.1. Database Connection Control Functions - PostgreSQL
The following functions deal with making a connection to a PostgreSQL backend server. An application program can have several backend connections open at ......
Read more >Setting the connection properties - JDBC Driver for SQL Server
(Version 6.0+) Use this property to connect to a database using an access token. accessToken can't be set using the connection URL.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
for me, I had to define the “authentication database” to make it work, so:
this didn’t work (in .env):
this works:
otherwise I would get
Error: Error parsing connection string: Database must be defined in the connection string
error@stevemu This worked for me - thank you for this