Mark,

You're correct, when I change the output file to /tmp/filename it works
but now I've got a file in /tmp with permissions

-rw-rw-rw- mysql mysql

So I'm still stuck.  

What I'm trying to do is under user "MIS" run a report that dumps to a
.csv file, then emails that .csv file to me and then archives it in
/home/MIS/scripts/archive/ with it's name changed to
"filename-date.csv".

I've got a script in /home/MIS/scripts that is run by crontab to do this
so I can always change that script to read the contents of /tmp/filename
into another file and then go from there but how do I then kill the
original /tmp/filename so that mysql will write another one next time?
I suppose I could run a root cron that deletes that filename once a
day/week but that's kind of sloppy.  Is there a better way?

Jeff McKeon
IT Manager
Telaurus Communications LLC
[EMAIL PROTECTED]
(973) 889-8990 ex 209 

***The information contained in this communication is confidential. It
is intended only for the sole use of the recipient named above and may
be legally privileged. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this communication, or any of its contents or attachments,
is expressly prohibited. If you have received this communication in
error, please re-send it to the sender and delete the original message,
and any copy of it, from your computer system. Thank You.***



-----Original Message-----
From: Mark Matthews [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2003 11:05 AM
To: Jeff McKeon
Cc: Mysql List
Subject: Re: CSV Formated output


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeff McKeon wrote:

> Ok, I've got FILE priv set on my user now, it had to use
>
> GRANT FILE ON *.*
>
> As it appears the FILE prive isn't a db level priv?
>
> Still getting the same results though, can't write the file...
>
> ERROR 1 at line 1: Can't create/write to file '/home/MIS/shiplist.csv'
> (Errcode: 13)

That means the user that the mysql server is running as (usually
'mysql') doesn't have write access to /home/MIS. You'll need to have the
'outfile' be somewhere that 'mysql' has write access to...(like /tmp,
but beware of the security implications that may/may not have in your
particular setup)...

(Error #13 is 'Access Denied' on Unix).

        -Mark

- --
For technical support contracts, visit https://order.mysql.com/?ref=mmma

    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, SW Dev. Manager - J2EE/Windows
/_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
        <___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/BEYKtvXNTca6JD8RAhsZAJ9cKMcMqpGPZTN7LCvVJtvqkx8j1gCeOufa
huySMaw0Z8upXSL5bfUusig=
=Ay2k
-----END PGP SIGNATURE-----


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

Reply via email to