How can I have MySQL write outfiles as a different user?

Posted by David Locke on Stack Overflow See other posts from Stack Overflow or by David Locke
Published on 2008-10-23T22:50:38Z Indexed on 2010/06/12 12:03 UTC
Read the original article Hit count: 265

Filed under:
|

I'm working with a MySQL query that writes into an outfile. I run this query once every day or two and so I want to be able to remove the outfile without having to resort to su or sudo. The only way I can think of making that happen is to have the outfile written as owned by someone other than the mysql user. Is this possible?

Edit: I am not redirecting output to a file, I am using the INTO OUTFILE part of a select query to output to a file.

If it helps:

mysql --version
mysql  Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (x86_64) using readline 5.2

© Stack Overflow or respective owner

Related posts about mysql

Related posts about linux