Forums

Is there any way of connecting a flutter app to MySQL Database in PythonAnyWhere???

Please, somebody can tell me :( I´m trying to connect my flutter app with mysql package, but I don´t know if it is possible..........

Your best bet is to create an API in a web app and then use flutter to access the API using HTTP.

Hello, I know the suggestion is to use API, however my current structure is making queries directly to the database using transactions and mySQL.

I’ve setup my flask web to use SQLAlchemy.

I’m kind of on a short deadline, and creating the full migration to API on my flutter app is a bit of a stretch.

With the paid version of pythonAnywhere, is it possible to have these both connected?

I’m still getting into the whole web developing thing, I know this isn’t ideal but the application isn’t going to be large scale.

Is this possible?

Thanks so much in advance. :)

If it's really not going to be large scale and doesn't need to be super performant then you could try accessing it via ssh using Python. See link below

https://help.pythonanywhere.com/pages/AccessingMySQLFromOutsidePythonAnywhere/

Just to be clear to anyone reading this later. This ^^ is not a recommended way to connect an external app to your database