Replies |
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Jerome
Posted on: 4/23/2012 9:42:29 PM
|
Level: Starter | Status: [Member] | Points: 25
|
Hi Singaravel M,
I already used LongBlob dataype but it gets error when I try to save big binary data.Do you have other idea instead?
Jerome
Thanks
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
can i know error details..?
Regards,
Singaravel M
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Jerome
Posted on: 4/23/2012 9:52:31 PM
|
Level: Starter | Status: [Member] | Points: 25
|
data loo long for coulum pic,which my field name...
Cheers,
Jerome
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
It all depends on the column type used for the picture column
.TINYBLOB: maximum length of 255 bytes
.BLOB: maximum length of 65,535 bytes
.MEDIUMBLOB: maximum length of 16,777,215 bytes
.LONGBLOB: maximum length of 4,294,967,295 bytes
compare with ur image size and use correct data type...
Regards,
Singaravel M
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
This error throws only when input size is exceed the declaration size..
So once again check it..
Regards,
Singaravel M
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Jerome
Posted on: 4/23/2012 10:44:31 PM
|
Level: Starter | Status: [Member] | Points: 25
|
What if image size exceeds long blob max length..
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
what is ur image size...?
Regards,
Singaravel M
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Jerome
Posted on: 4/23/2012 11:37:17 PM
|
Level: Starter | Status: [Member] | Points: 25
|
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Bugwee
Posted on: 4/24/2012 12:19:49 AM
|
Level: Starter | Status: [Member] | Points: 50
|
 the max allowed packet variable in your sql server exceeds.
try to run :
set max_allowed_packet = 500M
now restart the MySQl service and you are done
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Jerome
Posted on: 4/24/2012 1:05:53 AM
|
Level: Starter | Status: [Member] | Points: 25
|
where did I put this code?
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Bugwee
Posted on: 4/24/2012 1:10:24 AM
|
Level: Starter | Status: [Member] | Points: 25
|
run it on the mysql query browser or in mysql workbench...
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Bugwee
Posted on: 4/24/2012 1:14:11 AM
|
Level: Starter | Status: [Member] | Points: 50
|
 you can also change directly the packet size via Mysql Administrator... locate and change the max_allowed_packet, under Startup Variables
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Jerome
Posted on: 4/24/2012 1:14:31 AM
|
Level: Starter | Status: [Member] | Points: 25
|
what do you by 500M?megabyte?
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
yes 500 MB
Regards,
Singaravel M
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Bugwee
Posted on: 4/24/2012 1:19:38 AM
|
Level: Starter | Status: [Member] | Points: 25
|
Yes right. M = megabyte.
by default the max allowed packet size = 1M. if you want to insert files greater than 1M then you will got a max_allowed_packet error.
If you want to insert 5mb files or lesser then set the max allowed packet to 5M.
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Jerome
Posted on: 4/24/2012 1:43:55 AM
|
Level: Starter | Status: [Member] | Points: 25
|
I could not find max_allowed_packet under startup variable.I also run the code in mysql query browser and it gets error."Incorrect argument type to variable 'max_allowed_packet' "
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Bugwee
Posted on: 4/24/2012 2:05:00 AM
|
Level: Starter | Status: [Member] | Points: 25
|
Did you find the Startup variable or Startup parameter on the mysql Admistrator? i think, if you click on that there are tabs displayed like General parameters, my isam parameters, innodb parameters, etc.... find the the packet size in any of the tabs... i think you can see there like default value = 1M.
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
edit your my.cnf file and add
max_allowed_packet=500M
then restart
Regards,
Singaravel M
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Jerome
Posted on: 4/24/2012 3:32:36 AM
|
Level: Starter | Status: [Member] | Points: 25
|
where would I found my.cnf file?
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
By default found at:
/etc/my.cnf
or
/etc/mysql/my.cnf
Regards,
Singaravel M
Jerome, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|