Switch to: V12V11V10V9V8V7V6V5

Migration to Valentina Database

Importing/Exporting Existing Data

Q: How I can import a database from Access, SQL Server, mySQL, ... into a Valentina database?

Migration from MySQL

There are two commonly used ways:

  1. ODBC import
  2. Load SQL dump

ODBC import

Most simple way - just do following:

  1. 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”.

  1. Run Valentina Studio and choose “File”→“Import…” menu. Then follow wizard instructions.

Load SQL dump

  1. Firstly you should do SQL-dump against your MySQL database. But it should be the dump which requires a minimal set of manual corrections.

Something like:

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
  1. 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 );

instead of

CREATE TABLE `t1` ( `f1` INT ) ENGINE=MyISAM AUTO_INCREMENT=314 DEFAULT CHARSET=utf8;
  1. Run Valentina Studio, create new database and load this dump into it.