I think this does what you want. I'm using mysql 5.1.60, this outputs field names on the first line. This will use "\t" as the field separator, I'm not sure how to ask for a comma instead.
echo "SELECT * FROM brand;" | mysql -uXXX -pXXX databasename > brand.tsv