Import a CSV File to Mysql Database
To Import a CSV File in MySQL Database execute this query with path to the csv file you need to import:
LOAD DATA LOCAL INFILE ‘filetoimport.csv’
INTO TABLE <tablename>
FIELDS TERMINATED BY ‘,’
LINES TERMINATED BY ‘\n’
(field1, field2, field3….,field-n);
[box type=”info”] Remember to match the columns in your csv and MySQL table.[/box]









