Difference between revisions of "Migrating a database from mysql to sqlite"
From Linuxintro
imported>ThorstenStaerk |
imported>ThorstenStaerk |
||
Line 1: | Line 1: | ||
− | I | + | I migrated my mediawiki's MySQL database to SQLite. |
+ | |||
+ | To do this | ||
* I created a dump (aka backup aka export) of the database | * I created a dump (aka backup aka export) of the database | ||
mysqldump wikidb -u wikiuser -p > dump.sql | mysqldump wikidb -u wikiuser -p > dump.sql | ||
Line 5: | Line 7: | ||
wget https://gist.github.com/esperlu/943776/raw/dd87f4088f6d5ec7563478f7a28a37ba02cf26e2/mysql2sqlite.sh | wget https://gist.github.com/esperlu/943776/raw/dd87f4088f6d5ec7563478f7a28a37ba02cf26e2/mysql2sqlite.sh | ||
* I started this converter | * I started this converter | ||
− | sh mysql2sqlite.sh -u wikiuser -p wikidb | | + | sh mysql2sqlite.sh -u wikiuser -p wikidb | sqlite3 test.sqlite |
= See also = | = See also = | ||
* [[migrating mediawiki from mysql to sqlite]] | * [[migrating mediawiki from mysql to sqlite]] |
Latest revision as of 13:03, 7 September 2013
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