Next.js Discord

Discord Forum

Error connecting mysql to Vercel

Answered
Rex posted this in #help-forum
Open in Discord
RexOP
While deploying, got this error on build:
LibsqlError: URL_SCHEME_NOT_SUPPORTED: The client supports only "libsql:", "wss:", "ws:", "https:", "http:" and "file:" URLs, got "mysql:".
Answered by joulev
pretty sure libsql is for sqlite not mysql. you need a mysql driver instead
View full answer

18 Replies

Answer
@joulev pretty sure libsql is for sqlite not mysql. you need a mysql driver instead
RexOP
You mean on Vercel or I need to install it on my app?
@Rex You mean on Vercel or I need to install it on my app?
in your app as a npm package. what mysql provider are you using?
i.e. what mysql database host are you using?
RexOP
but I need one for mysql
Yes I found this in my package:
"@libsql/client": "^0.3.6",
@Rex Yes I found this in my package: "@libsql/client": "^0.3.6",
yes and this is not for mysql. what mysql host are you using? planetscale?
RexOP
Idk what do you mean by "what host", cause one of my friend shared this with me, so it's hosted privately
not planetscale
libsql is sqlite which is not mysql so you cannot use a libsql driver for mysql
RexOP
Thanks! I'll try now 🙂
actually since you're hosting on vercel, i recommend this over that one https://github.com/jeremydaly/serverless-mysql
since vercel is serverless so server-ful drivers like mysql might encounter some issues
RexOP
ohh ok
so I don't have to mind if mysql is serverless or not?
basically:
if you host on vercel, use serverless-mysql (or similar drivers with the "serverless" label)
if you self-host in your own server, use mysql