mysql -uroot
mysql> select yourfield from youtable into outfile '/tmp/test.csv' fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n';
vim /tmp/tset.csv