Skip to content

Instantly share code, notes, and snippets.

@habedi
Forked from shalaby/importCSV.sql
Created December 28, 2017 16:17
Show Gist options
  • Save habedi/9aab6ed496b090978c620b0b173e62ce to your computer and use it in GitHub Desktop.
Save habedi/9aab6ed496b090978c620b0b173e62ce to your computer and use it in GitHub Desktop.
Import csv to mariadb
mysql -uroot -p --local-infile
LOAD DATA LOCAL INFILE "file.csv"
INTO TABLE db.table
FIELDS TERMINATED BY ','
ENCLOSED BY '\"'
LINES TERMINATED BY '\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment