0

So my binary is: 0011010101100100001101000011000100110100001100000011001001100001011000100110001100110100011000100011001001100001001101110011011001100010001110010011011100110001001110010110010000111001001100010011000100110000001100010011011101100011001101010011100100110010

Md5: 5d41402abc4b2a76b9719d911017c592

Password: hello

I know the datatype is BINARY in mysql but what size do i need to make it? what do i fill in for the x?

BINARY(x)

2 Answers2

1

According to this, you can predict the size of a md5.

If you don't want to, it seems like VARBINARY type is what you're looking for.

Community
  • 1
  • 1
bemug
  • 1,694
  • 2
  • 12
  • 10
  • According to this http://en.wikipedia.org/wiki/MD5 and what you linked me to, you can predict the size of a md5 hash. an md5 hash is always a 32 character string. and no, i want to store my Binary as a Binary in MYSQL. –  Sep 08 '14 at 08:14
  • Ok I really missunderstood your question. Sorry about that, Richard Grant has the answer you're looking for. – bemug Sep 08 '14 at 12:22
1

According to the MANUAL:

[...] the length for BINARY and VARBINARY is a length in bytes rather than in characters.
logicBV
  • 23
  • 1
  • 7