tags:

views:

30

answers:

1

In MySQL 5.1 when I type:

select Password('test123');

I get password as 41 bytes long. The same, when typed in older MySQL versions, is 16-bytes long. I need to store 16-byte long passwords, so is there any way to specify length (16-bytes) while retrieving/encrypting the password?

+3  A: 

They changed hashing schemes at one point, but you can still use the old one, it's just named OLD_PASSWORD now:

SELECT OLD_PASSWORD('test123');
Michael Mrozek
If I'm not mistaken, you can also supply that you want to use old passwords in the connection string
simendsjo
Thanks a million Michael.
Sharpeye500
@Karthick - don't forget to accept the answer once StackOverflow lets you :)
Matchu
@Matchu - Yes done :)
Sharpeye500