Migration from sqlite to mysql

Here some brief instruction: to migrate from ghost v5 sqlite to mysql. Maybe someone find it useful.

  1. set up mysql8 @sql_mode parameter Migration failed update from 5.19.3 to 5.22.1 · Issue #15743 · TryGhost/Ghost · GitHub

  2. dump database: sqlite3 blog.db .dump > blog.sqlite

  3. make dump mysql-compatible python3 translator.py dump.sqlite > dump.mysql

  4. load dump to new mysql database mysql -p -u user -h localhost ghost < dump.mysql

3 Likes