Skip to content

Instantly share code, notes, and snippets.

@reyesyang
Created February 27, 2014 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reyesyang/9246533 to your computer and use it in GitHub Desktop.
Save reyesyang/9246533 to your computer and use it in GitHub Desktop.
Save Mysql query result to csv file, When you have no write permission on mysql server.
mysql -N -hhostname -uusername -ppassword database_name -e "select id, DATE(updated_at) from topics where status < 10 limit 10" | sed 's/\t/,/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment