Should read the image from node js file path and insert it as a blob. Then it works.
fs.readFile(path+image.filename, function(err, data) {
if (err) throw err
var sql = 'Insert into table (id,image) VALUES ?';
var values=[["1",data]];
connection.query(sql,[values], function (err, data) {
if (err) {
// some error occured
console.log("database error-----------"+err);
} else {
// successfully inserted into db
console.log("database insert sucessfull-----------");
}
});
})