Load Delimited Data into MySQL

Published Mar 30, 2009

How to load Data from a CSV or any delimited file to MySQL:

LOAD DATA LOCAL INFILE '/path/to/file/name' INTO TABLE `tablename` FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';

Keeping in mind that the delimited used here is , so FIELDS TEMINATED BY ','

You can change the delimiter to any thing your data have.