Work with mysql and gunicorn

Hello,
i have installed gunicorn to run my app from ubuntu linux server
pip install gunicorn flask

Until now, I was testing on a sqlite database but now I would like a mysql database, could I install apache without gunicorn stopping working or should I install another one?

Greetings

Apache has nothing to do with gunicorn, except that they’re both web
servers and if you want to run both you’ll need to run each of different
listening ports.

I don’t see the connection between mysql and/or apache?

Nothing above prevents you accessing MySQL instead of SQLite.

Maybe you should elaborate on what you’re trying to achieve?

Cheers,
Cameron Simpson cs@cskk.id.au

I have an application that is running with the gunicorn web server and makes the queries in a sqlite database, now I want to replace sqlite with mysql, what is the best way?

Start by a web search for gunicorn mysql

1: python3 -m pip install mysqlclient (mysqlclient · PyPI)
2: look at your code which opens the SQLite database, and adjust the connecting code

They both speak SQL and broadly access after connection will be the same.

Docs here: https://mysqlclient.readthedocs.io/

Cheers,
Cameron Simpson cs@cskk.id.au