Search code examples
javamysqljdbcarraysbinaryfiles

Mysql byte array storage


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?


Solution

  • Use BLOB, medium blob , varbinary

    Mysql Choosing the Right Type for a Column