select md5('password');
[chen@linux chen]$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11947 to server version: 4.0.13-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select md5('chen');
+----------------------------------+
| md5('chen') |
+----------------------------------+
| a1a8887793acfc199182a649e905daab |
+----------------------------------+
1 row in set (0.00 sec)
mysql>
mysql> select md5('chen') as passwd;
+----------------------------------+
| passwd |
+----------------------------------+
| a1a8887793acfc199182a649e905daab |
+----------------------------------+
1 row in set (0.00 sec)
mysql>