title: mysql dump to localhost outfile from a remote database
body: <p>I'm stuck. I basically want to create a LOCAL data file (csv file) from a remote database using the OUTFILE command. </p>
  
  <p>I am basically, pulling data.. and want to create it on my local file server vs. creating the outfile on the remote server.  I'm limited on space remotely, thus I want to create the file locally. What am I missing on how to do this?  Thanks!</p>
  
  <p>This is my working syntax so far on the command line (it is creating the file I want, but on the remote server)</p>
  
  <pre><code>mysql -u test -pfoo --database test -h testdb201.name.host.com --port 3306 -ss -e "SELECT 'a','b','c' UNION SELECT col1, col2, col3 INTO OUTFILE '/tmp/mytest.csv' FIELDS TERMINATED BY ','  FROM tst_p000 limit 10"
  </code></pre>