读书人

mysql如何加密密码

发布时间: 2012-03-15 11:50:38 作者: rapoo

mysql怎么加密密码?
最近密码泄露事件很轰动,我是用插入的SQL语句写入mysql的,明文保存密码!新闻说可以密文保存密码?请问密文保存完整的SQL语句是什么?请教,谢谢。

[解决办法]

引用MD5(str)

Calculates an MD5 128-bit checksum for the string. The value is returned as a binary string of 32 hex digits, or NULL if the argument was NULL. The return value can, for example, be used as a hash key.

mysql> SELECT MD5('testing');
-> 'ae2b1fca515949e5d54fb22b8ed95575'

This is the “RSA Data Security, Inc. MD5 Message-Digest Algorithm.”

读书人网 >Mysql

热点推荐