MySQL Forums
Forum List  »  Perl

Re: table to output "into outfile"
Posted by: Bill Karwin
Date: November 29, 2006 01:57PM

An absolute pathname is one points to the same location regardless of your current working directory. For instance, on UNIX/Linux, a pathname that begins with "/" starts from the root of the filesystem, and this is an absolute pathname.

Absolute pathnames are distinct from relative pathnames, which are made starting at your current working directory.

So this query would write its output in /tmp:

SELECT ... INTO OUTFILE '/tmp/query_results.txt'

Whereas this query would write its output into the current working directory of the MySQL Server thread that runs the query (typically this is the MySQL Server data directory for the current database):

SELECT ... INTO OUTFILE 'query_results.txt'

When you say that it still won't work, it would help us to troubleshoot if you were more specific. What query did you try? Did you get an error? If so, what was the error message? Or did you get no error but you just can't find the file?

Also please let us know what version of MySQL you use (query "select version();") and what operating system you use, e.g. Windows, Linux, etc.

Regards,
Bill K.

Options: ReplyQuote


Subject
Written By
Posted
September 09, 2006 12:50PM
Re: table to output "into outfile"
November 29, 2006 01:57PM


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.