how to store video in database using mysql?

mysql, store, video

Solution

you need to add two slash in path. Check following query.it's work with me. use this

INSERT INTO GAME values (3, 'Termonator2',LOAD_FILE("C:\\Users\\Public\\Videos\\Sample Video\\test.mpg"));   

instead of

INSERT INTO GAME  VALUES(3, "Termonator2", 
LOAD_FILE("C:\Users\Public\Videos\Sample Videos"));  

enjoy.....

Problem

I try to store a video file into database using MySQL, But i don't known how do store video file into database. I try following query but it didn't work. ``` CREATE TABLE GAME ( GAME_ID INTEGER NOT NULL PRIMARY KEY, GAME_NAME VARCHAR (20), VIDEO LONGBLOB ); INSERT INTO GAME VALUES(3, "Termonator2", LOAD_FILE("C:\Users\Public\Videos\Sample Videos")); ``` Please give me any reference or hint. Any help is appreciated.

Original source