I have a byte array created in Java. It represents content of some file. I don't know exactly the maximum size of this array. It can be different sizes. I want to store it in mysql. What type should I use in mysql?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Use BLOB
, medium blob
, varbinary
Mysql Choosing the Right Type for a Column
回答2:
Use varbinary
to store byte arrays of arbitrary length in MySQL.
回答3:
use a blob
field
java serialblob
mysql blob