title: Exporting Blob from MySQL database to file with only SQL
body: <p>I have a table with image data stored in a blob field in a MySQL database. Is there a way to export those images to files on the filesystem by using only SQL? The images should be named {imageId}.jpg</p>
  
  <p>I know that it is easy to do this with Java or whatever but is it possible with just a SQL script?</p>