Archive for the ‘MYSQL’ Category

solved : “max_allowed_packet” issue in MYSQL

December 2, 2009

I came across this problem when uploading an attachment greater than 1 MB.

I am storing the uploaded file in database table having column datatype as blob.

I have solved this problem as follows:

1) open my.cnf file

in linux, it is placed /etc/my.cnf

2) add  max_allowed_paclet = 256M under [mysqld]

e.g.,

[mysqld]
max_allowed_packet=256M

You can specify whatever packet size as per your need. “M” indicates MB

3) Restart the mysql server.

Advertisements