title: ERROR PRIVILEGES WITH SELECT INTO FILE ... ON MYSQL
body: <p>Am trying to perform a select into outfile, am having following errors</p>
  
  <p>My request:</p>
  
  <pre><code>SELECT * INTO OUTFILE '/local/home/datawords/upload/inscrit_newsletter_us.csv'
  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
  LINES TERMINATED BY '\n'
  FROM newsletter_us;
  </code></pre>
  
  <p>Error:<br></p>
  
  <blockquote>
    <p>ERROR 1 (HY000): Can't create/write to file '/local/home/datawords/upload/exports/inscrit_newsletter_us.csv' (Errcode: 2)</p>
  </blockquote>
  
  <p>The exports directory have permission set to 0777.</p>