Import an image into sql workbench

34 views Asked by At

I'd like to read an image on my sql workbench but I can't, do you know where my error is?

Here is my code :

use Jeux;

CREATE TABLE images
(
    id int AUTO_INCREMENT PRIMARY KEY,
    name varchar(200),
    img BLOB
);

INSERT INTO images 
VALUES (id, LOAD_FILE('/Users/mariebaroni/Desktop/ImagesJeux/DominoBleu1.png'));

But the path looks right:

enter image description here

But when I search for it, the line returns null:

enter image description here

Thank you for your help !

(I tried moving the image directly to the desktop to simplify the path, but SQL still couldn't find it)

0

There are 0 answers