Have you looked at this Perl script ? I did not use it - just quickly searched mysql for sqlite migration and it appeared right up.
Edit (after you answered my comment):
The reverse direction is considered here .
If you intend to do this multiple times, and if data structure changes occur, you might be better off using something like Django (albeit in a very hacky way). With this, I would:
# This three lines are done once django-admin.py startproject mymigrationproject cd mymigrationproject ./manage.py startapp migration # The following lines you repeat each time you want to migrate the data edit settings.py and make the changes to connect to MySQL ./manage.py inspectdb > ./migration/models.py edit ./migration/models.py to reorder tables (tables in which other tables depend on top) mkdir fixtures ./manage.py dumpdata migration > ./fixtures/data.json edit settings.py and make the changes to connect to SQLite ./manage.py syncdb ./manage.py loaddata ./fixtures.data.json
cethegeek
source share