I'm running an Ubuntu Server with Plesk and I need to export a file (xls) from MySQL using OUTFILE. I have this query:
SELECT * FROM table INTO OUTFILE 'xxxxxx.xls'
The file is saved into folder /var/lib/mysql/
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/ ?
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: http://dev.mysql.com/doc/refman/5.0/en/cannot-create.html). I checked the permissions on the folder and everything seems to be correct. Anyone have more information on how to solve this problem?