I need to import into a mysql server (5.5) a set of large data having one field as a blob. Following the samples of SELECT INTO OUTFILE and LOAD DATA INFILE, it works [almos
You can use the SET part of LOAD DATA INFILE, and you don't need the 0x escaping stuff:
1, 1, 123456FF
2, 1, aabbcc
3, 1, ddeeff
And then you assign the column to a variable, and then set the column to the UNHEXed version of that variable:
LOAD DATA INFILE 'file' INTO TABLE `table` (column1, column2, @var1)
SET column3 = UNHEX(@var1)
Couldn't find any alternative. It looks like the only way is the binary
one (also, there is already a bug/feature-request on mysql regarding this).
Two things to consider: