the password() function – mysql 4 vs. mysql 5
Posted March 17, 2008on:
We’re planning on upgrading from an archaic mysql engine (3.58) to the latest, shiny release version (5.1), so I’ve undertaking a code review of some of our administration applications to see what this unearthed.
Turns out the password hashing for the MySQL native
PASSWORD() function changed in version 4.1, so our login system won’t work in 5.1. Great.
Turns out we’ll be able to skirt around this by making sdure this line is in the new my.cnf file:
old-passwords = 1
It’s great this was thought of, as
PASSWORD() is a one-way, irreversible function, so authentication will fail for any old application using it when it is run on mysql >= 4.1.
thanks to [ducea.com]
Need to improve your MySQL skills? I recommend:
High Performance MySQL: Optimization, Backups, Replication, and More