export mySQL to CSV
All you need is to do the following:
SELECT a,b,a+b INTO OUTFILE ‘/tmp/result.text’
FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘”‘
LINES TERMINATED BY ‘n’
FROM test_table;
And the results are sent to /tmp/result.text in CSV format.