By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,400 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,400 IT Pros & Developers. It's quick & easy.

Binary data handling with mysql client

P: n/a
I am wondering what I miss to be able to handle binary data from the
mysql client. I have ensured that the user has file_priv set to 'Y'
and that max_allowed_packet is larger that the binary lumps handled.

Here is my version:
Ver 4.1.5-gamma-log for pc-linux on i686 (Source distribution)

Right now I'm trying this to insert binary data:
mysql> update table set col=load_file("/path/file") where id=1;

....and this to fetch the data again:
mysql> select col from table into outfile "/path/file";

As for insertion I am actually not quite sure whether or not it goes
well, since I get garbled data out from the fetching. Any way to check
the data when inside the table (data length, for instance)?

I have two problems with the fetching of data:
1) I cannot specify a path. I am only allowed to specify a filename,
and the that file is written to the table's directory in the server's
data directory.
2) The resulting file is garbled data. I am not sure if this garbling
happened at the time of insertion of data or when I fetched the data
out again.

Can anyone help?

Med venlig hilsen / Best regards
David List
Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.