ndb_import — Import CSV Data Into NDB ndb_import  requires two arguments.  db_name  is the name of the database where the table into which to import the data is found;  file_name  is the name of the CSV file from which to read the data; this must include the path to this file if it is not in the current directory. The name of the file must match that of the table; the file’s extension, if any, is not taken into consideration. Options supported by  ndb_import include those for specifying field separators, escapes, and line terminators, and are described later in this section.  ndb_import  must be able to connect to an NDB Cluster management server; for this reason, there must be an unused  [api]  slot in the cluster  config.ini  file. To duplicate an existing table that uses a different storage engine, such as  InnoDB , as an  NDB  table, use the  mysql  client to perform a  SELECT INTO OUTFILE  statement to export the existing table to a CSV file, then to execute a  CREATE TABLE LIKE  statement to create a new table having the same structure as the existing table, then perform  ALTER TABLE ... ENGINE=NDB  on the new table; after this, from the system shell, invoke  ndb_import  to load the data into the new  NDB  table. For example, an existing InnoDB  table named  myinnodb_table  in a database named  myinnodb  can be exported into an  NDB table named  myndb_table  in a database named  myndb  as shown here, assuming that you are already logged in as a MySQL user with the appropriate privileges: The output should resemble what is shown here: Once the target database and table have been created, a running  mysqld  is no longer required. You can stop it using  mysqladmin shutdown  or another method before proceeding, if you wish. All options that can be used with  ndb_import  are shown in the following table. Additional descriptions follow the table. 1. In the  mysql  client: 2. In the system shell: 4319 mysql>  USE myinnodb; mysql>  SELECT * INTO OUTFILE ’/tmp/myndb_table.csv’ > FIELDS TERMINATED BY ’,’ OPTIONALLY ENCLOSED BY ’"’ ESCAPED BY ’\\’ > LINES TERMINATED BY ’
’ > FROM myinnodbtable; mysql>  CREATE DATABASE myndb; mysql>  USE myndb; mysql>  CREATE TABLE myndb_table LIKE myinnodb.myinnodb_table; mysql>  ALTER TABLE myndb_table ENGINE=NDB; mysql>  EXIT; Bye shell> # if you are not already in the MySQL bin directory: shell>  cd  path-to-mysql-bin-dir shell>  ndb_import myndb /tmp/myndb_table.csv --fields-optionally-enclosed-by=’"’ \ --fields-terminated-by="," --fields-escaped-by=’\\’ job-1 import myndb.myndb_table from /tmp/myndb_table.csv job-1 [running] import myndb.myndb_table from /tmp/myndb_table.csv job-1 [success] import myndb.myndb_table from /tmp/myndb_table.csv job-1 imported 19984 rows in 0h0m9s at 2277 rows/s jobs summary: defined: 1 run: 1 with success: 1 with failure: 0 shell>