I have a PDF file on a local machine. I want to upload this file into a BINARY BLOB on a SQL database. Other approaches mentioned here [Binary Data in MySQL all use PHP. I want a simple clean way to upload this PDF file on the Linux command line. Unfortunately, I do not have access to the remote filesystem so cannot just store links to the file as mentioned elsewhere... I sort of need to use this MySQL database as a virtual filesystem for these PDF files..
From the PhP example, it seems all that is required is to escape the slashes before using the INSERT command? Is there a simple way to achieve that on a Linux command-line?
Not sure if this completely solves my problem, but I found a filesystem layer implemented on top of MySQL. I guess I can use that to store my PDF files as BLOBs automatically... still need to figure out how to store keys to the PDF file in this filesystem for structured access to the PDF file based on something more meaningful than < inode,seq >.
http://sourceforge.net/projects/mysqlfs/ and
http://www.linux.com/archive/feature/127055