Import data from mysql to mongo
To import data from mysql into mongodb we need to export data from mysql in a format mongo likes, this is either a tsv or a csv. Ideally you would like to use the following sql select columns INTO OUTFILE '/path/to/csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' from table [where clause] What the above SQL does is exports the data (only data , no headers) into a file as provided in your path, make sure you have access to location where you are putting the file. If you ignore the path and just use the filename this will be stored in the location where mysql data files are stored. To get the fields in the data file, we can use the following echo "SELECT * FROM ;" | mysql -uXXX -pXXX > '/path/to/ .tsv' Finally you want all the be imported into a mongo database, here since our file contains a header we specify the --headerline option. For a complete list of...