Skip to content

Instantly share code, notes, and snippets.

@nadsella
Last active April 29, 2021 07:53
Show Gist options
  • Save nadsella/84da38197422f0e6ee0065759a45ce3b to your computer and use it in GitHub Desktop.
Save nadsella/84da38197422f0e6ee0065759a45ce3b to your computer and use it in GitHub Desktop.
Run SQL query and save data into specified file
mysql -A -D <db_name> -h <db_host> -u<user> -p -e "<query>"|tail -n +2 > <file_name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment