I need to insert more than 10 MB size video into MySQL database. how to do that?
I try following query.
{
insert into mscit_video values(1,'bcg',LOAD_FILE('c:\\abc\\xyz.mpg')
}
using this query i stored 1 MB video into database successfully, but if i tried
to insert more than 10MB size of video it give following error.
"java.sql.SQLException: Result of load_file() was larger than max_allowed_packet (1048576) - truncated"
Is posible to store video in database more than 10 MB? if yes then how?
Give me any rference or hint.
Thanks in Advance..
Notice that the problem here is not the database/table/field's capacity, but the packet sending (I've met this problem before while sending very long concatenated queries, from client to server). Do you have administrator rights on your MySQL database? You might want to increase the max allowed packet size.
You need to specify longblob
as data type of your movie column. It can store up to 4 GB
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With