Enabling Large Blob Requests

By default, MySQL only allows requests of a limited size. This can be limiting, especially when you’re trying to insert a record with a large blob (e.g., in an application that allows file upload into a blob column). Since blobs can be fairly large, you probably want to bump up the maximum allowed “packet” size.

You can change the maximum size of SQL packets by adding a line to the my.inifile that appears in your MySQL Installation directory:


This file has two parts:

  1. A “client” section, used by any MySQL clients (including the command line client); and
  2. A “server” section, used by the MySQL database server.

(According to documentation, the JDBC driver doesn’t care about this ini file; instead it asks the server what its setting is).

The revision absolutely must be in both areas.

After you’ve made the change, you’ll need to bounce the MySQL server. Stop and restart the MySQL service and any MySQL clients before proceeding.

Here are some MySQL documents that discuss this topic:

It's only fair to share...
Share on Facebook
Tweet about this on Twitter
Share on LinkedIn

Leave a Reply