Re: incorrect string value
> I need to select data as hex?
In order to diagnose what's wrong---the idea is to see exactly what you've stored in the table, specifically whether the question marks you saw were due to your UI failing to interpret what it was given, or whether the stored data is in fact a string of question marks.
Clearly it's the latter. You've been inserting corrupt blobs.
So you need to check every step, from your data source through to your table, to see when and how the corruption occurs---at each stage testing the method and tool you used against the result of a method that's you've proved to be correct & reliable.
Here's a little php script that will reliably save a blob to a table, and test the saved result against the source. You need to execute something like this, in the language of your choice, for each of your blob-processing steps ...
<?php
$mysqli = new mysqli( 'localhost', '...', '...', 'test' );
$mysqli->query( "drop table if exists blob_tb" );
$mysqli->query( "create table if not exists blob_tb( bdata blob)" );
$imgfile = "SPECIFY_IMG_FILE";
$sql = "INSERT INTO blob_tb (bdata) VALUES(?)";
$insertStm = $mysqli->prepare($sql);
$blob = NULL; //necessary
$insertStm->bind_param('b', $blob);
$blob = (binary) ( file_get_contents($imgfile) );
$insertStm->send_long_data(0, $blob);
$insertStm->execute();
$insertStm->close();
$selectStm = $mysqli->prepare("SELECT bdata FROM blob_tb LIMIT 1");
$selectStm->execute();
$selectStm->bind_result($savedBlob);
$selectStm->fetch();
$selectStm->close();
$mysqli->close();
echo 'src and save result are equal: ' . ((int) ($blob == $savedBlob));
?>