Darren Beale Web developer & early adopter

ArchiveFebruary 2005

mysqldump to CSV file

m

Dead simple this one, but not initially obvious. How do you use mysqldump to generate a CSV file of data? mysqldump –u [username] –fields-terminated-by=, –tab=[DIR TO SAVE TO] –tables [DB NAME] [TABLENAME] > [TABLENAME].txt This’ll place into the specified directory two files: one a SQL file containing the table definition and the data as a CSV. If you want you...

Darren Beale Web developer & early adopter