How to store binary data in MySQL -
this question has answer here:
- binary data in mysql 10 answers
how store binary data in mysql database?
this question not straight forward answer, sounds: there lots of different binary data usage patterns out there, each own caveats , pros , cons. let me try summarize:
- short pieces of binary data, such password hashes, work base64-encoding them , storing resulting string varchar
- "not-quite-binary" data, such document snipplets occasional non-printable can escaped , sored string
- the blob datatype allows store arbitrary chunks of binary data, recommend against using it: store data in file, store path file in string type. gain nothing storing binary data, db doesn't "understand" in db.
Comments
Post a Comment