Next.js Discord

Discord Forum

prisma "the URL must start with the protocol `file:`"

Answered
SharpieMaster posted this in #help-forum
Open in Discord
Avatar
I am using planet scale for the url and it works on my machine, how can I fix this?
Answered by SharpieMaster
I re-generated the planetscale url and redeployed with github
View full answer

21 Replies

Avatar
Image
Avatar
does your .env look likeDATABASE_URL='mysql:// (at least the start of the url?)
and is the other service vercel? as you can just link planetscale to them and it auto adds creds...
Avatar
Image
Avatar
umm thats a little odd that it doesn't work ngl
Avatar
it is
Avatar
[and your prisma file has the config for mysql?](https://www.prisma.io/docs/concepts/database-connectors/mysql)
Avatar
Image
Avatar
yeah so... umm that should work...
try linking your vercel to planetscale as that worked for me... (maybe it sets config better)... but ... i am really lost on why it doesn't work
(esp weird as you say it works localy...)
Avatar
Image
kinda trolling
the only difference is that locally I am using the dev branch of the database, but that is not the error, like what
Avatar
so, if you use the same prod link in you local... it should still work tho?
Avatar
it does
i tried
Avatar
ok ig it works now
I did literally nothing
Avatar
YAY!
Avatar
I re-generated the planetscale url and redeployed with github
Answer