mysql将查询结果导出csv文件的方法into outfile

例句:

select * from table_name into outfile ‘/tmp/tmp.csv‘ fields terminated by ‘,‘;

  详解: ① into outfile ‘/tmp/tmp.csv‘ 指定导出文件的目录和文件名   ② fields terminated by ‘,‘ 将数据以逗号“,”隔开