Exporting Data To File and Can't Create/Write to File

2007-05-28 Thread John Kopanas

I am doing the following:

echo 'SELECT * FROM jobs WHERE id = 1 INTO OUTFILE
/Users/jkopanas/Sites/test_this_out.csv;' | mysql -uroot
backlog_development

And I get the following error:
ERROR 1 (HY000) at line 1: Can't create/write to file
'/Users/jkopanas/Sites/test_this_out.csv' (Errcode: 13)

I found this on mysql:
http://dev.mysql.com/doc/refman/5.0/en/cannot-create.html

I checked to see if root had File_priv and he/she does.  I am
developing this on Mac OS X but I am deploying on a linux box.

Any input? :-)

--
John Kopanas
[EMAIL PROTECTED]

http://www.kopanas.com
http://www.cusec.net
http://www.soen.info

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Exporting Data To File and Can't Create/Write to File

2007-05-28 Thread Baron Schwartz

Hi,

John Kopanas wrote:

I am doing the following:

echo 'SELECT * FROM jobs WHERE id = 1 INTO OUTFILE
/Users/jkopanas/Sites/test_this_out.csv;' | mysql -uroot
backlog_development

And I get the following error:
ERROR 1 (HY000) at line 1: Can't create/write to file
'/Users/jkopanas/Sites/test_this_out.csv' (Errcode: 13)

I found this on mysql:
http://dev.mysql.com/doc/refman/5.0/en/cannot-create.html

I checked to see if root had File_priv and he/she does.  I am
developing this on Mac OS X but I am deploying on a linux box.


Does /Users/jkopanas/Sites/ exist?  Does the user MySQL runs as have 
permission to write to it?


Baron

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Exporting Data To File and Can't Create/Write to File

2007-05-28 Thread John Kopanas

Directory existed but I did not have the right permissions on the
directory for the mysql user.  Thanks my friend. :-)

On 5/28/07, Baron Schwartz [EMAIL PROTECTED] wrote:

Hi,

John Kopanas wrote:
 I am doing the following:

 echo 'SELECT * FROM jobs WHERE id = 1 INTO OUTFILE
 /Users/jkopanas/Sites/test_this_out.csv;' | mysql -uroot
 backlog_development

 And I get the following error:
 ERROR 1 (HY000) at line 1: Can't create/write to file
 '/Users/jkopanas/Sites/test_this_out.csv' (Errcode: 13)

 I found this on mysql:
 http://dev.mysql.com/doc/refman/5.0/en/cannot-create.html

 I checked to see if root had File_priv and he/she does.  I am
 developing this on Mac OS X but I am deploying on a linux box.

Does /Users/jkopanas/Sites/ exist?  Does the user MySQL runs as have
permission to write to it?

Baron




--
John Kopanas
[EMAIL PROTECTED]

http://www.kopanas.com
http://www.cusec.net
http://www.soen.info

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]