Reputation:
Workbench 6.0.2.
I have inserted the image using the following query:
create table images (ID int,Image BLOB);
insert into images values (1,load_file('C:\Users\PEL_AY\Desktop\1.jpg') );
But the problem is how to view the image stored image database using load_file
Do I need a front-end to view the image?
Upvotes: 5
Views: 15166
Reputation: 53307
You can embed image data just like any data in a MySQL table. For binary data you usually would use a BLOB column data type. MySQL Workbench has a built-in editor for binary data, which you can open via the result grid context menu:
This editor allows to view text, hex binary values and images (limited to those formats the platform can show, e.g. on Windows bmp, gif, png, jpg and a few more).
Upvotes: 9