title: MYSQL OUTFILE Folder
body: <p>I'm running an Ubuntu Server with Plesk and I need to export a file (xls) from MySQL using OUTFILE. I have this query:</p>
  
  <blockquote>
    <p>SELECT * FROM table INTO OUTFILE 'xxxxxx.xls'</p>
  </blockquote>
  
  <p>The file is saved into folder /var/lib/mysql/</p>
  
  <p>I can create other folders inside mysql folder too and it works, but the question is, how can i save the file into a folder outside mysql folder, something like /var/www/something/ ?</p>
  
  <p>If I try this example I get MySQL Errcode: 13 (Can't create/write to file).
  I researched this into MySQL docs and this could be a permissions issue (See: <a href="http://dev.mysql.com/doc/refman/5.0/en/cannot-create.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/cannot-create.html</a>). I checked the permissions on the folder and everything seems to be correct. Anyone have more information on how to solve this problem?</p>