Problem about outputing data
Posted by:
C C
Date: May 20, 2009 12:21PM
Hi,
I met this problem.
When I use
SELECT * INTO OUTFILE "/home/xxx/output.dat" FIELDS TERMINATED BY "|" FROM yyy;
MySQL cannot write to file "/home/xxx/output.dat" even if I login as xxx.
So I change the path of output file as follows:
SELECT * INTO OUTFILE "/tmp/output.dat" FIELDS TERMINATED BY "|" FROM yyy;
Now MySQL write the result to output.dat but the owner of the filename is mysql!!!! not myself.
My questions are
1) why the owner of the "output.dat" is mysql? Just because it creates it???
2) how to use
SELECT * INTO OUTFILE "/home/xxx/output.dat" FIELDS TERMINATED BY "|" FROM yyy;
to save the output file to /home/xxx/output.dat without using command chmod 777 xxx beforehand?
Thanks.
Subject
Written By
Posted
Problem about outputing data
May 20, 2009 12:21PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.