Export my Mysql PDF binary_blob into a file
August 4, 2010 6:05 PM   Subscribe

Exporting PDF binary blog data into an outfile with mysql. Yeah, remind me how to do that without getting corrupt files again?

I've got PDF data stored in a mysql database as a binary blob.

I just want to do a:

select binary_data into outfile "C:/exported.pdf" from file where id = 1234;

... but of course the resulting PDF file that I get is corrupted.

I know I've done this before - specifically with PDF data - and there was some magic trick with ESCAPED BY or characterset or some other magical $%^ing option that I can't remember now that my brain's fried.

What am I missing?
posted by bhance to Computers & Internet (1 answer total)
 
After your filename try:
FIELDS TERMINATED BY '' ENCLOSED BY '' ESCAPED BY '' LINES TERMINATED BY '' STARTING BY ''
That should turn off all of the data mangling.
posted by sbutler at 6:21 PM on August 4, 2010 [1 favorite]


« Older Movie ID: Help me remember a m...   |  Feed me, Seymour! I'm a hard-... Newer »
This thread is closed to new comments.