This tutorial explains how to use the MySQL MD5 function with syntax and examples.
The MySQL MD5 function returns an MD5 128-bit checksum representation of a string.
The syntax for the MD5 function in MySQL is:
MD5( string )
The plaintext string used to generate the MD5 128-bit checksum.
The MD5 function can be used in the following versions of MySQL:
Let's look at some MySQL MD5 function examples and explore how to use the MD5 function in MySQL.
For example:
mysql> SELECT MD5('abc');
Output: '900150983cd24fb0d6963f7d28e17f72'
mysql> SELECT MD5('password');
Output: '5f4dcc3b5aa765d61d8327deb882cf99'
mysql> SELECT MD5('AODBA');
Output: 'cf2318ef9f508f3db56da2aeb6a7f829'
mysql> SELECT MD5(NULL);
Output: NULL