As a workaround, I can I run mysql from the command line and redirect the output, like:
mysql -h host1 -D db1 -u user1 -p password1 -e "SELECT * FROM table" > test123.csv
This appears to output with the equivalent of:
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\n'
The problem is my users need the CSV files in Comma Separated format.
I experimented with SED to see if I could convert any CSV file from TAB separated fields to COMMA separated fields.
This command line would seem to do it:
sed -i -e 's/\t/","/g' -e 's/^/"/' -e 's/$/"/' test123.csv
First command replaces \t (tab) with "," (quote, comma, quote)
Second command inserts " (quote) at the beginning of each line
Third command inserts " (quote) at the end of each line
Given the restrictions I have, any thoughts as to whether this is the best approach to output MySQL data into a Comma Separated CSV?