Migration from SQLite to MySQL: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
(Created page with "== Overview == Steps for exporting SQLite data and objects and importing them into a MySQL database. == Exporting from SQLite == <syntaxhighlight lang="dos"> > sqlite3 mySq...")
 
No edit summary
Tag: wikieditor
 
Line 17: Line 17:
* Import the SQL using '''phpMyAdmin'''
* Import the SQL using '''phpMyAdmin'''


[[Category:SQLite]] [[Category:MySQL]] [[Category:Django]] [[Category:Web Development]]
[[Category:SQLite]] [[Category:MySQL]][[Category:MariaDB]][[Category:Django]] [[Category:Web Development]]

Latest revision as of 13:44, 5 March 2024

Overview[edit]

Steps for exporting SQLite data and objects and importing them into a MySQL database.

Exporting from SQLite[edit]

> sqlite3 mySqliteDatabase.db .dump >> myDumpFile.sql

Importing into MySQL[edit]

  • Edit the dump file to make the SQL compatible with MySQL.
    • Replace double-quotes with back-ticks
    • Remove BEGIN TRANSACTION, COMMIT and lines related to sqlite_sequence
    • Replace autoincrement with auto_increment
  • Import the SQL using phpMyAdmin