script to convert mysql dump sql file into format that can be imported into sqlite3 db

后端 未结 9 2213
说谎
说谎 2020-11-29 03:07

I have an export SQL file containing tables and data from MySQL and I want to import it into a Sqlite 3 DB.

What is the best way to do that?

Just importing t

9条回答
  •  野性不改
    2020-11-29 03:46

    I had an issue with the mysql db being ISO-8859-1 (Latin-1). When did the conversion to sqlite3 assumed the data was UTF-8 resulting in decoding errors.

    It was easy to fix with this:

    iconv -f ISO-8859-1 -t UTF-8 mysql_dump_file > mysql_dump_file_utf8

    Incase this helps someone.

提交回复
热议问题