1

For various reasons, I must use a SQLite database with a local application. However, I wrote a Flask app that enables users to more easily classify items in the database, and it runs very slow on pythonanywhere hosting (which I believe is hosting its services on AWS) because of the SQLite. They support MySQL databases, and I believe it would be a significant performance boost for my users to migrate the data to MySQL. However, I need to then pull the data back out of MySQL and write it back into SQLite to work with the local applications. My concern is that the BLOB data would get messed up by creating a dump script (it's binary pickled data that contains Python data structures the application works with once unpickled).

Currently updating the local copy is as easy as downloading the SQLite database from the server. What is an optimal way to migrate this data to MySQL in such a way that it will be easy to migrate it back to SQLite? Should I?

asked Nov 20, 2014 at 19:06
3
  • If you like python, this may be useful to you: stackoverflow.com/a/1067151/342196 use that on a sqlite dump and import it to MySQL. Commented Nov 20, 2014 at 20:42
  • @jynus thanks for sharing, are you sure that would handle BLOB data sufficiently? Commented Nov 20, 2014 at 21:03
  • no, that doesn't have into account blobs, you you will need an extra filter to convert SQLlite's 0'CAFEBABE' into MySQL's 0xCAFEBABE. If you need a more professional tool, check the options at stackoverflow.com/a/6000355/342196 Commented Nov 20, 2014 at 21:13

1 Answer 1

-1

It can be done with an initial manual migration from SQLite to a central MySQL database and then using a synchronization solutions like MySQLSync may be OK for this use case. Of course it would be best to start with an initial proof of concept application to verify if this is a feasible solution for this use case.

Disclosure: I work for DidiSoft (the company behind MySQLSync)

answered Aug 19 at 11:45

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.