Skip to content

Instantly share code, notes, and snippets.

@tiller1010
Created April 10, 2024 17:04
Show Gist options
  • Select an option

  • Save tiller1010/15a8a40c682555efbf65fc82a295a7bc to your computer and use it in GitHub Desktop.

Select an option

Save tiller1010/15a8a40c682555efbf65fc82a295a7bc to your computer and use it in GitHub Desktop.
Ouput mysql query to csv file
SELECT * FROM `table_name`
into outfile '/var/lib/mysql-files/output-new.csv' fields terminated by "," enclosed by '"' lines terminated by "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment