Skip to content

Instantly share code, notes, and snippets.

@asaph
Created July 6, 2015 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save asaph/98229ed4a55b54c9feee to your computer and use it in GitHub Desktop.
Save asaph/98229ed4a55b54c9feee to your computer and use it in GitHub Desktop.
Import a CSV file into a MySQL table ignoring header line
load data infile '/tmp/file.csv'
into table my_table
fields terminated by ','
optionally enclosed by '"'
escaped by '"'
lines terminated by '\n'
ignore 1 lines;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment