title: Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
body: <p>I encountered such a problem: <strong>Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement</strong>
  when I tried to execute MySQL statement (Windows):</p>
  
  <pre><code>SELECT *
  FROM xxxx
  WHERE XXX
  INTO OUTFILE 'report.csv'
      FIELDS TERMINATED BY '#'
      ENCLOSED BY '"'
      LINES TERMINATED BY '\n'
  </code></pre>
  
  <p>When I execute it without:</p>
  
  <pre><code>INTO OUTFILE 'report.csv'
      FIELDS TERMINATED BY '#'
      ENCLOSED BY '"'
      LINES TERMINATED BY '\n'
  </code></pre>
  
  <p>Then it works. Also, the same statement with <code>INTO OUTFILE xxx</code> actually worked before I reinstalled the MySQL server. </p>
  
  <p>Anybody has ideas how to deal with this error?</p>