Table of Contents
Migration to Valentina Database
Importing/Exporting Existing Data
Migration from MySQL
There are two commonly used ways:
- ODBC import
- Load SQL dump
Most simple way - just do following:
- Check MySQL instance for ANSI_QUOTES is set as described in
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_ansi_quotes Because, ODBC-import generates queries with idents quoted by double quotes (following ANSI standard). So MySQL instance should be able to run something like - SELECT “f1” FROM “t1”.
- Run Valentina Studio and choose “File”→“Import…” menu. Then follow wizard instructions.
Load SQL dump
- Firstly you should do SQL-dump against your MySQL database. But it should be the dump which requires a minimal set of manual corrections.
mysqldump.exe db1 -u root -p --skip-set-charset --skip-extended-insert --skip-add-locks --skip-disable-keys --add-drop-table --quote-names > mysql_db
- There are some clauses that Valentina database is not supporting. Not a big
problem - it's easy to remove it manually.
- Remove 'PRIMARY KEY' and 'KEY' clauses there (just not able
to find appropriate key for mysqldump.exe utility)
- Change MEDIUMBLOB type to the BLOB ones.
- Remove “ENGINE=…” clauses in “CREATE TABLE” statements - to get something like
CREATE TABLE `t1` ( `f1` INT );
CREATE TABLE `t1` ( `f1` INT ) ENGINE=MyISAM AUTO_INCREMENT=314 DEFAULT CHARSET=utf8;
- Run Valentina Studio, create new database and load this dump into it.