mysqlblobbackendmysql-workbenchdata-storage

How do I see my image (BLOB) in MySQL Workbench


I am having trouble seeing my image. No matter what I do, it turns up null.

SHOW VARIABLES LIKE 'secure_file_priv';

would give me enter image description here

In that folder, I have a folder called Image, and then images (.jpg)

however,

select LOAD_FILE('\Image\agatti-airport-india2.jpg');

gives me

enter image description here

I've tried /Image/, ./Image/, Image/ , Image\ and all the variations.

I've also tried absolute path, which doesn't work for some reason.


Solution

  • So I've found an answer

    1. You have to put the entire absolute path, that includes the show variables like "secure_file_priv";

    2. You have to make sure you use forward slash (/) not backslash ()

    In my case, C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Image/agatti-airport-india2.jpg would be correct. I still don't know why absolute paths to other paths would not work