Skip to content

Instantly share code, notes, and snippets.

@mrgcohen
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrgcohen/4bb5bef68f943e2e81dc to your computer and use it in GitHub Desktop.
Save mrgcohen/4bb5bef68f943e2e81dc to your computer and use it in GitHub Desktop.
Mysql Import from excel on mac

Import Excel file (mac) into Mysql

  1. Save as csv
  2. run sql 'mysql_import_csv_from_excel.sql'
LOAD DATA LOCAL INFILE '~/filename.csv'
INTO TABLE table_name
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\r'
IGNORE 1 lines
(column1,column2,column3...);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment