At 13:55 -0500 11/19/03, Denis Mercier wrote:
On Wed, 2003-11-19 at 12:26, Paul DuBois wrote:
At 11:03 -0500 11/19/03, Denis Mercier wrote:

> > >> >i also tried:
>> >> >use my_db;
>> >> >select * from my_table;
>> >> >
>> >> >so when i try shell> mysql --pager < test1 | tar x
>> >> >
>> >> >the tar file does not get written to /usr/local/test1 but i still dont
>> >> >get my untared files? write permissions are ok?
>> >> >what am i missing?
>> >>
>> >> Have you verified that the mysql command actually writes any output, for
>> >> example, with this command:
>> >>
>> > > shell> mysql --pager < test1 | wc
>> >>
>> >> Do you get any output from tar at all, such as an error message?
>> >> Maybe the output from mysql isn't suitable. Couple of things to try:
>> >>
>> >The output from mysql seems fine because when it does write the value
>> >of my blob I get a well formatted tar file,
>> >I'm thinking that maybe tar cannot handle a stream as it's input?
>>
>> That may be. In that case, you should invoke tar as
>>
>> tar xf -
>>
>
>I have tried tar xf but tar gives me an error, it wants a file
>specified.


 But I didn't say to use "tar xf".  I said to use "tar xf -".  That
 dash is highly significant.  It means "The file to read is the
 standard input".

tried tar xf - mysql < test1 | tar xf - tar: This does not look like a tar archive tar: Skipping to next header tar: Error exit delayed from previous errors

I dont get it, if i do this command:

mysql> select * into dumpfile "/usr/local/test1.tar" from my_table

I get a tar archive written to /usr/local/

I'm using mysql client to store my tar file as a blob,
mysql> insert into my_table values(LOAD_FILE("/usr/local/test1.tar"));

could this function cause my problem?

No.


The output when you retrieve the column and send it into the pipe
contains something that is not part of the column contents itself.
Likely the column header.  Try using the --skip-column-names option
to suppress the header.

--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


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



Reply via email to