In this blog, we will learn how to insert an image from the local directory in the database, here some basic command in which we will insert an image.
Go to Mysql bin and type this-
C:\Program Files\MySQL\MySQL Server 8.0\bin> mysql -uroot -p
After this type your password.
Then create a database like an employee.
mysql> create database employee;
Then use database
mysql> use employee;
Then create table
mysql> create table Naveen;
Creating the table
Here we use "load_file" function to load the file:
CREATE TABLE pictures ( image_id int(10) NOT NULL auto_increment, image blob, PRIMARY KEY (image_id) );
Inserting value with directory
INSERT INTO pictures VALUES(1, LOAD_FILE('d:\flower.gif'));
Get your project or assignment completed by Deep learning expert and experienced developers and researchers.
If you have project files, You can send at email@example.com directly