If you would like to save binary data – such as images – in your database, you should use the BLOB storage type. These are the max. BLOB Sizes:

L = length of data

TINYBLOB = L + 1 bytes (max size is 2^8 – 1 or 255 bytes)
BLOB
= L + 2 bytes (max size is 2^16 – 1 or 65,535 bytes, 65KB)
MEDIUMBLOB = L + 3 bytes (max size is 2^24 – 1 or 16,777,215 bytes, 16MB)
LONGBLOB = L + 4 bytes (max size is 2^32 – 1 or 4,294,967,295 bytes, 4GB)

For further details, please check the MySQL Manual.

Flattr this!