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 s
Not using the "SELECT...INTO OUTFILE" syntax, no.
You need to run the query (ie client) as another user, and redirect the output. For example, edit your crontab to run the following command whenever you want:
mysql db_schema -e 'SELECT col,... FROM table' > /tmp/outfile.txt
That will create /tmp/outfile.txt as the user who's crontab you've added the command to.