Skip to content

Instantly share code, notes, and snippets.

@jfgomez86
Created December 1, 2011 14:42
Show Gist options
  • Select an option

  • Save jfgomez86/1417244 to your computer and use it in GitHub Desktop.

Select an option

Save jfgomez86/1417244 to your computer and use it in GitHub Desktop.
Export from MySQL to CSV
SELECT username,fullname,email
INTO OUTFILE '/tmp/users.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM users;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment