Skip to content

Instantly share code, notes, and snippets.

@shalaby
Last active March 30, 2022 10:59
Show Gist options
  • Save shalaby/deb7edca438c86b45afd to your computer and use it in GitHub Desktop.
Save shalaby/deb7edca438c86b45afd 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