What is the maximum length of data I can put in a BLOB column in MySQL?

MysqlBlob

Mysql Problem Overview


What is the maximum length of data I can put in a BLOB column in MySQL?

Mysql Solutions


Solution 1 - Mysql

A BLOB can be 65535 bytes (64 KB) maximum.

If you need more consider using:

  • a MEDIUMBLOB for 16777215 bytes (16 MB)

  • a LONGBLOB for 4294967295 bytes (4 GB).

See Storage Requirements for String Types for more info.

Solution 2 - Mysql

May or may not be accurate, but according to this site: http://www.htmlite.com/mysql003.php.

> BLOB A string with a maximum length of 65535 characters.

The MySQL manual says:

> The maximum size of a BLOB or TEXT > object is determined by its type, but > the largest value you actually can > transmit between the client and server > is determined by the amount of > available memory and the size of the > communications buffers

I think the first site gets their answers from interpreting the MySQL manual, per http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNewyView Question on Stackoverflow
Solution 1 - MysqlWhiteFang34View Answer on Stackoverflow
Solution 2 - MysqlTieson T.View Answer on Stackoverflow