solved : “max_allowed_packet” issue in MYSQL

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: