Skip to content

Instantly share code, notes, and snippets.

Michael Rodríguez Torrent / Miquel Rodríguez Telep mrtorrent

Block or report user

Report or block mrtorrent

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mrtorrent
mrtorrent / mysql2sqlite.sh
Created Oct 14, 2011 — forked from esperlu/mysql2sqlite.sh
MySQL to Sqlite converter
View mysql2sqlite.sh
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is chosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
You can’t perform that action at this time.