Mysql二进制数据类型

时间:2014-09-08 06:53:12

标签: mysql types binary

所以我的二进制文件是: 0011010101100100001101000011000100110100001100000011001001100001011000100110001100110100011000100011001001100001001101110011011001100010001110010011011100110001001110010110010000111001001100010011000100110000001100010011011101100011001101010011100100110010

的Md5: 5d41402abc4b2a76b9719d911017c592

密码: 喂

我知道mysql中的数据类型是BINARY,但我需要它的大小是多少?我为x填写了什么?

BINARY(x)

2 个答案:

答案 0 :(得分:1)

根据this,您可以预测md5的大小。

如果您不愿意,似乎VARBINARY类型就是您正在寻找的。

答案 1 :(得分:1)

根据MANUAL

[...] the length for BINARY and VARBINARY is a length in bytes rather than in characters.