How to import from mysql dump


#1

Hi all
I have dumps created from:

mysql Ver 14.14 Distrib 5.7.22, for Linux (x86_64)

And I’m trying to import to memSQL 6.8.2 and what I get is the following error:

Running: mysql.exe --protocol=tcp --host=memesql-server --user=root --port=3306 --default-character-set=utf8 --comments --database=jiradb < “exportedDB.sql”

ERROR 1706 (HY000) at line 27: Feature ‘FOREIGN (non-SHARD) key to a sharded table’ is not supported by MemSQL.

Does anyone know if there’s a way to import data directly from a mysql dump?
What I’m planning is to migrate some or all of my DBs from mysql.


#2

While MemSQL is mostly compatible with mysql there are some differences. Foreign keys are not supported in MemSQL so you will need to edit the DDL to remove them. You also want to think about what tables you want to be row store and which you want to be column store and edit the DDL syntax for table creation accordingly. (The default is row store and you can start with that just to get things going but make sure you have enough memory to hold all the row store data as row store is stored all in RAM. Column store is on disk so it is a better choice for large amounts of data). We have a document that explains how to move from MySQL using mysqldump here: https://docs.memsql.com/operational-manual/v6.8/transitioning-from-mysql-to-memsql/. We also have a list of the MySQL features that are not supported here: https://docs.memsql.com/concepts/v6.8/mysql-features-unsupported-in-memsql/