Question

I am running 2 MySQL databases in different servers. One works as expected, the other is giving me trouble with the MD5 function.

SELECT MD5(1);

In the "good" database, the MD5 returned is c4ca4238a0b923820dcc509a6f75849b In the other, the value returned is 6334636134323338613062393233383230646363353039613666373538343962

------------- Versions ---------------

GOOD:

protocol_version         10
version                  5.5.8
version_comment          MySQL Community Server (GPL)
version_compile_machine  x86
version_compile_os       Win32

BAD:

protocol_version          10
version                   5.1.73-cll
version_comment           MySQL Community Server (GPLv2)
version_compile_machine   x86_64
version_compile_os        unknown-linux-gnu

Why?

Was it helpful?

Solution

Before Mysql 5.5 the return was a binary string. After 5.5 the string return is non-binary

https://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html#function_md5

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top