ivz-dev
10/3/2016 - 11:19 AM

Mysql. Import csv file

Mysql. Import csv file

mysql -u [user] -p --local-infile [db_name]
LOAD DATA LOCAL INFILE [file_name] INTO TABLE [table_name] FIELDS TERMINATED BY ';' ENCLOSED BY '"' LINES TERMINATED BY '\n' (`field1`, `field2`);