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?
Is MySQL varchar case sensitive? The CHAR and VARCHAR types are not case sensitive by default, but may be declared as BINARY to make them case sensitive. ENUM , SET , and TEXT columns are not case sensitive.
Use the SQL data type CHAR(60) to store this encoding of a Bcrypt hash. Note this function doesn't encode as a string of hexadecimal digits, so we can't as easily unhex it to store in binary. Other hash functions still have uses, but not for storing passwords, so I'll keep the original answer below, written in 2008.
The default user for MySQL is root and by default it has no password. If you set a password for MySQL and you can't recall it, you can always reset it and choose another one.
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');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With