以Mysql 4.1版本为分界线,两种加密方式
Mysql323加密:(16位)
select old_password(‘root‘); //Mysql自带加密函数old_password(str)
mysql> select old_password(‘root‘); +----------------------+ | old_password(‘root‘) | +----------------------+ | 67457e226a1a15bd | +----------------------+ 1 row in set (0.00 sec)
MysqlSHA1加密:(去掉*号40位,单向加密,只能通过密码库匹配出来)
select password(‘root‘); //Mysql自带加密函数password(str)
mysql> select password(‘root‘); +-------------------------------------------+ | password(‘root‘) | +-------------------------------------------+ | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B | +-------------------------------------------+ 1 row in set (0.00 sec)
时间: 2024-10-13 11:56:55