Skip to content

Instantly share code, notes, and snippets.

@davidromani
Created May 8, 2012 06:12
Show Gist options
  • Save davidromani/2632961 to your computer and use it in GitHub Desktop.
Save davidromani/2632961 to your computer and use it in GitHub Desktop.
Import CSV into MySQL table
LOAD DATA LOCAL INFILE '/path/to/file.csv' INTO TABLE <database.table_name>
FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'
(field1, field2, fieldN);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment