MySQL Database Upgrade Changes PASSWORD Field Lengths
I recently upgraded my server. The new server had a newer version of MySQL installed. And all of a sudden, my scripts that used passwords in the database tables quit working.
After doing some research, I found that MySQL changed the length on the PASSWORD function used in the SQL queries. The length of the field it produces is now 41 characters long. All my password fields were set too short and so they were not converting correctly. I changed my table layouts to 41 characters for password fields and everything worked correctly again.
One way to tell if your version uses the new length is to look for an asterisk (*) in the first character of the generated password. The new version always puts this asterisk at the beginning.
I didn’t research enough to understand everything about the change - I just didn’t have the time. You can find all the details at the MySQL website. I just read enough to know what I needed to change to make my passwords work again. But, I did read enough to know that the change was made to increase security in the encryption scheme used for the passwords. So, I guess that’s a good thing.
May 22nd, 2006 at 1:44 pm
[…] The only real difference I’ve noticed that may cause some problems is the upgraded MySQL which can cause problems with old password scripts. See my Tech Tip for today. […]