Kexi/Migration/MySQL/Migration from file-based project to a MySQL database project: Difference between revisions

From KDE Community Wiki
< Kexi‎ | Migration‎ | MySQL
(Created page with "This is sqlite3 to mysql conversion using python script sqlite3-to-mysql.py, see also this [http://www.redmine.org/boards/2/topics/12793 thread]. Steps for importing mydb pro...")
 
No edit summary
 
Line 5: Line 5:
1. Execute:
1. Execute:
  % sqlite3 mydb.kexi .dump > mydb.sql
  % sqlite3 mydb.kexi .dump > mydb.sql
2. Download [[/sqlite3-to-mysql.py/]] and run:
2. Download [[Kexi/Migration/sqlite3-to-mysql.py|sqlite3-to-mysql.py]] and run:
  % ./sqlite3-to-mysql.py mydb.sql > mydb.mysql
  % ./sqlite3-to-mysql.py mydb.sql > mydb.mysql
3. Create empty MySQL database
3. Create empty MySQL database

Latest revision as of 12:05, 26 June 2014

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.