How to connect FastAPI with Planetscale (mysqlclient error)
Hey, how are you guys doing? I have a backend on Railway who is running with FastAPI (using this template https://railway.app/template/-NvLj4).
I'm also using planetscale, which requires me to have
mysqlclient
as a dependency. The problem is that when the app is building I'm getting the error attached.
Does anyone know how can I fix this?8 Replies
Project ID:
2cec54f7-d04f-4c70-8360-d4c48cf0e9b6
2cec54f7-d04f-4c70-8360-d4c48cf0e9b6
GitHub
python provider: support mysql backends for django by char8 · Pull ...
Fixes #483 and Fixes #488 by providing the dependency required by the mysqlclient python package.
Tested building the example linked in #488 (🙏 ) locally and running the resulting container against...
you can always try to install that package yourself, add this as a nixpacks.toml to your project
Hey, @Brody, thank you for the help! It looks like the error it's a bit different now:
Here's how I added what you told:
the missing
mysql_com.h
is said to be included in libmysqlclient-dev
truthfully the mysql dependency with python has always been a mystery, with the solution being, use postgres or use some other pre-built mysql python package
let me see if I can find that package
https://discord.com/channels/713503345364697088/1133956338867773470/1134336721711009822