Paul DuBois wrote:
At 10:14 AM -0400 4/13/07, Amer Neely wrote:
I'm using MySQL 5.0.21 and am trying to find out if it is possible to overwrite an existing file when using a 'SELECT ... INTO' command from the command line. Is there another parameter that can do this? I've looked through the online reference manual, but found no specific help there.

You cannot.  This is a security feature.  Otherwise, you might be able
to select into such files as /etc/password or /etc/shells.

 From the manual:

The SELECT ... INTO OUTFILE 'file_name' form of SELECT writes the selected rows to a file. The file is created on the server host, so you must have the FILE privilege to use this syntax. file_name cannot be an existing file, which among other things prevents files such as /etc/passwd and database tables from being destroyed.

http://dev.mysql.com/doc/refman/5.0/en/select.html


Thank you. Makes sense once you think about it. That settles it then. Perl script it is.

--
Amer Neely
w: www.softouch.on.ca/
Perl | MySQL programming for all data entry forms.
"We make web sites work!"

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

Reply via email to