Migrating a database from mysql to sqlite

From Linuxintro

I migrated my mediawiki's MySQL database to SQLite.

To do this

  • I created a dump (aka backup aka export) of the database
mysqldump wikidb -u wikiuser -p > dump.sql
  • I got a MySQL -> SQLite converter
wget https://gist.github.com/esperlu/943776/raw/dd87f4088f6d5ec7563478f7a28a37ba02cf26e2/mysql2sqlite.sh
  • I started this converter
sh mysql2sqlite.sh -u wikiuser -p wikidb | sqlite3 test.sqlite

See also