Created
October 3, 2019 08:40
-
-
Save francoiskielbasa/7f432d52d0516028ca5167e8722030be to your computer and use it in GitHub Desktop.
Export mysql 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 -e "select * from users" db_name | sed "s/\"/\"\"/g;s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > export.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment