몇가지 방법이 있는 것 같은데,
제가 자주 쓰는 방법은

select col1, col2, col3, col4 from tablename
into outfile '~/filename.csv'
fields terminated by ','
enclosed by '"'
lines terminated by '\n';