First explain the type of blob, directly from the online excerpt!!!
1. MySQL has four types of blobs:
Tinyblob: Only 255 characters
blob: Maximum limit to 65K bytes
Mediumblob: Limit to 16M bytes
Longblob: Up to 4GB
2, in addition to the type of access to the file size is limited, but also to modify the MySQL configuration file.
Windows, Linux basically the same by modifying the file My.ini or my.cnf file, add max_allowed_packet=10m in the file (that is, the maximum 10m,mysql default seems to 1MB, add the first look to ensure that it is not set)
3, do the above settings, if you upload a larger file or some files are still error, such as reported some garbled, estimation is the following problem.
Database or table character set problems, such as hibernate connection using utf-8, table is GBK, etc., generally as long as you set the data connection part of hibernate, such as
Jdbc:mysql://192.168.0.4:3306/test?useunicode=true&characterencoding=utf-8
MySQL has four types of blobs