title: Mysql export resultset as CSV from remote server
body: <p>My application runs on server 1 and DB is on server 2.I want to get the output of select query as a CSV to server 1 i.e. my application server.How can I achieve this.
  Select into outfile wont help because it dumps only on the local server so if I run query on DB server it would create the file on it not the application server.
  mysql -e option also doesent help because it does not dump as CSV.
  Could anyone suggest how to directly create file locally as CSV from remote server?
  Thanks.</p>