How do I store binary data in a MySQL database?
相关问题
- sqlyog export query result as csv
- NOT DISTINCT query in mySQL
- MySQL: conduct a basic search
- Why sometimes there is one of more gap(s) in the v
- mySQL alter table on update, current timestamp
I would suggest
LONGBLOB
for storing files inMySQL
. It all depends on what kind of binary and your application.This question is not so straight forward to answer, as it sounds: There are lots of different binary data usage patterns out there, each with their own caveats and pros and cons. Let me try to summarize:
Binary data can be stored in a MySQL database in a BLOB field. A BLOB is a binary large object that can hold a variable amount of data.