How to store binary data in MySQL -


this question has answer here:

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

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -