New topic: 

MySQL large BLOBs

<http://forums.realsoftware.com/viewtopic.php?t=46947>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        neonash7777          Post subject: MySQL large BLOBsPosted: Thu 
Feb 14, 2013 4:05 pm                                 
Joined: Mon Nov 29, 2010 7:01 pm
Posts: 388                So I allow the user to add documents to various 
objects in the database from their computer.

This works great for images, text files, and pdf's.

But when we try an audio or video file it causes an error.

Do I need to parse the file and add it in chunks? Or is there some setting in 
the MySQL database I need to change to allow for larger files?


Also I'm using "LongBlob" as the type, should I be using a regular "BLOB" type 
instead?   
                             Top                markwalsh          Post 
subject: Re: MySQL large BLOBsPosted: Thu Feb 14, 2013 4:15 pm                  
       
Joined: Wed May 20, 2009 4:43 pm
Posts: 937                neonash7777 wrote:So I allow the user to add 
documents to various objects in the database from their computer.

This works great for images, text files, and pdf's.

But when we try an audio or video file it causes an error.

Do I need to parse the file and add it in chunks? Or is there some setting in 
the MySQL database I need to change to allow for larger files?


Also I'm using "LongBlob" as the type, should I be using a regular "BLOB" type 
instead?
Check the max_allowed_packet size in the config file, I believe the default is 
pretty small (~1meg?)      
_________________
RB 2009r4 Windows XP  
                             Top                neonash7777          Post 
subject: Re: MySQL large BLOBsPosted: Thu Feb 14, 2013 4:30 pm                  
               
Joined: Mon Nov 29, 2010 7:01 pm
Posts: 388                markwalsh wrote:Check the max_allowed_packet size in 
the config file, I believe the default is pretty small (~1meg?)

I looked in the my.ini file and max_allowed_packet size is nowhere to be found. 
Do I need to add it myself? Anywhere specific?


--------EDIT

Looks like this should do the trick

# sets max_packet to 1G
max_allowed_packet=1024M


Thanks   
                             Top                markwalsh          Post 
subject: Re: MySQL large BLOBsPosted: Thu Feb 14, 2013 4:50 pm                  
       
Joined: Wed May 20, 2009 4:43 pm
Posts: 937                neonash7777 wrote:markwalsh wrote:Check the 
max_allowed_packet size in the config file, I believe the default is pretty 
small (~1meg?)

I looked in the my.ini file and max_allowed_packet size is nowhere to be found. 
Do I need to add it myself? Anywhere specific?
On my server, the file is named 'my.cnf'. Make sure you check the correct 
file(s) (there could be multiple configuration files).

Edit - Good to see you've got it working.      
_________________
RB 2009r4 Windows XP  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to