What is blob mysql blob size configuration

  • 2020-05-12 06:21:21
  • OfStack

BLOB is a large file. A typical BLOB is a picture or sound file. Due to their size, they must be processed in a special way (e.g., upload, download or store to a database). According to Eric Raymond, the main idea of handling BLOB is to let the file processor (such as the database manager) care less about what the file is and more about how to handle it. However, some experts emphasize that this approach to handling big data objects is a double-edged sword, which may cause some problems, such as storing too many binary files, which will degrade the performance of the database. Storing bulky multimedia objects in a database is a typical example of an application handling BLOB.

mysql BLOB type

In MySQL, BLOB is a family of types: TinyBlob, Blob, MediumBlob, LongBlob. The only difference between these types is that they differ in the maximum size of the files they store.
Four BLOB types of MySQL
Type size (in bytes)
TinyBlob maximum 255
65 K Blob biggest
16 M MediumBlob biggest
4 G LongBlob biggest

linux modify etc/my cnf
[mysqld]
max_allowed_packet = 16M // is different from max_allowed_packet under [mysqldump]


Related articles: