Forums

Flask App SQLite to MySQL

Hi there!

I'm looking to convert my flask app from SQLite to MySQL for several reasons. MySQL is faster, easier to edit, and everything in the database is up to date (SQLite uses two temp files with data that seem to not update the main database so I can't make up to date backups)

How would I go about doing this?

I would also need to get my current SQLite database to be updated with the latest data stored in the temp files.

Excellent idea :-)

How are you currently connecting to SQLite? Are you using SQLAlchemy or connecting directly?

I purchased the project a few months ago. I believe it is currently directly connecting to the database.

it uses this:

conn = sqlite3.connect('xxx')

c = conn.cursor()

See this. If you are not familiar with sqlite queries, the best way may be to use SQLAlchemy.