Created
December 5, 2016 14:25
-
-
Save pstaender/337f28fd54137dc0a84ba8bd2e70f268 to your computer and use it in GitHub Desktop.
mysqldump to csv
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 -B -u username -p password database -h dbhost -e "SELECT * FROM accounts;" \ | sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment