This topic describes how to export data from MemSQL databases using
mysqldump, which you can use because MemSQL supports the same
query-level inputs and outputs as MySQL.
mysqldump creates a .sql file
containing the queries necessary to recreate a database. You can run the
mysqldump against an instance of MemSQL or MySQL, so you can
use this strategy to move data between the two.
mysqldump reference page here.
Backing up a Single Database
$ mysqldump -h 127.0.0.1 -u root -P 3306 foo > foo.sql
If you have a database named “foo”, you can create a backup with the following command:
Backing up All Databases
If you want to back up every database in an instance of MemSQL, use the following command:
$ mysqldump -h 127.0.0.1 -u root -P 3306 --all-databases > full_backup.sql