Data Export and Import from One database to another Database


#1

Hi
wanted to understand what is the bes tway of exporting the data from one Database(one cluster) and import into another database (another) cluster.

I see there is mention about mysqldump utilities, is that the only option? I believe this utility will not come with MemSQL installation


#2

Do you mean moving from one MemSQL cluster to another? Or between two different databases?


#3

Hi

I am referring the movement from one cluster to another cluster. Say from QA cluster to Dev Cluster
looking for
–> exporting table(s) from source cluster/DB
–> importing table(s) to target Cluster/DB


#4

It really depends on your scenario. In addition to mysqldump, take a look at:

Replication:

SELECT INTO OUTFILE:

LOAD DATA:

MemSQL Pipelines:

And see this post about backup/restore:


#5

Is it safe to use MYSQLDUMP in production and columnstore ?
When doing select into file - does it save the file in each leaf or on the master ?


#6

select into outfile ... fields terminated by '\t' will save rows (not table schema) to file (TSV or whatever you decide)

mysqldump should save schemas + data for the specific table if you use this syntax: mysqldump -u... -p... mydb t1 > mydb_tables.sql

Keep in mind you would need enough disk on master agg to run these commands. No - it doesn’t save local to each leaf, like any other query it is run and returns all results/saves on the aggregator from which you run the query.