Created
March 26, 2019 22:01
-
-
Save badah/107b4d6195b06a210044991772482166 to your computer and use it in GitHub Desktop.
MYSQL: Export to .csv file
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
mysql -u{user} -p{pass} -h{host} {database} -e "{sql}" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > /{path}/my-export-{time}.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment