Jump to content

Kexi/Migration/MySQL/Migration from file-based project to a MySQL database project

From KDE Community Wiki
Revision as of 12:05, 26 June 2014 by Jstaniek (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is sqlite3 to mysql conversion using python script sqlite3-to-mysql.py, see also this thread.

Steps for importing mydb project from file into a MySQL db server:

1. Execute:

% sqlite3 mydb.kexi .dump > mydb.sql

2. Download sqlite3-to-mysql.py and run:

% ./sqlite3-to-mysql.py mydb.sql > mydb.mysql

3. Create empty MySQL database

% mysqladmin -p -u ..... create mydb

4. Finally, import

% mysql -p -u ..... mydb < mydb.mysql

Notes:

  • This tool can fail if large photos where stored in the database.
  • This tool is pretty slow.
  • Final solution will be just one click away in Kexi.