Created
October 29, 2016 09:51
-
-
Save nojaf/3bc40918ed58921d64f2cb7cf3e8b6f9 to your computer and use it in GitHub Desktop.
Export MySQL to csv
This file contains hidden or 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
SELECT * | |
FROM my_table | |
INTO OUTFILE '/var/lib/mysql-files/myfile.csv' | |
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