Last active
March 30, 2022 10:59
-
-
Save shalaby/deb7edca438c86b45afd to your computer and use it in GitHub Desktop.
Import csv to mariadb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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