How to use it
- 1Export your database (sqlite3 app.db .dump) and paste the SQL, or drop the .sql file.
- 2Read the review notes under the output — they list everything that needs a human decision.
- 3Download the MySQL script and run it against a staging database first.
What changes between SQLite and MySQL
INTEGER PRIMARY KEY AUTOINCREMENT becomes BIGINT AUTO_INCREMENT, TEXT becomes LONGTEXT, REAL becomes DOUBLE and BLOB becomes LONGBLOB. Declared types such as VARCHAR(100) or DATETIME are respected.
PRAGMA statements and sqlite_sequence rows are removed; BEGIN TRANSACTION becomes START TRANSACTION; double-quoted identifiers become backticks.
Indexes on TEXT columns get a 255-character prefix length, which MySQL requires.
What to check before you run it
Run the converted script against an empty staging database first, inside a transaction if the target supports transactional DDL. The review notes under the output list every statement that was dropped, every type with no direct equivalent and every clause that needs a manual decision.
Views, triggers, stored procedures and functions are passed through unchanged and flagged. Their bodies are written in SQLite's procedural language and need a human rewrite for MySQL.
After loading, compare row counts table by table. For a deeper check, export a table from both databases and run the two files through the CSV compare tool.
Questions
How do I get a dump out of SQLite?
Run sqlite3 app.db .dump > dump.sql, then paste or drop dump.sql here.