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

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -