mySQL OLD_PASSWORD

Sergey Pashkov sergey_pashkov at valentina-db.com
Sat Mar 2 04:11:40 EST 2013


Hello, Kay,

> So my question remains. The reason I'm not using the new format is because back when I upgraded mySQL Rev could not handle the new password format. I'm speaking to mySQL with LiveCode. So I need to know if anyone knows if LiveCoded has been upgraded so it can handle new mySQL passwords, if it hasn't then I need to stick with old passwords.
> 
> Although I access mySQL via LC I occassionally want to look at the raw tables. Currently I use Navicat, which has no problem with the old mySQL passwords. Now that Valentia Studio 5.0 is free I thought I'd use Studio instead.


mySQL is able to support both new password and old password formats at once, but for different users.

To use it, it is required to switch mySQL to generate new passwords by default,
turn off or remove server option "old-passwords" in [mysqld] section of my.cnf:
old-passwords=0 

This option doesn't change anything for existing users, it affects only new or changed users,
in other words, users with old password format will connect without any problem.

Now you can create a new user, and PASSWORD function will generate password in a new schema, Valentina Studio will connect to the mySQL.

To support older client (which is used by LiveCode, for example), we can generate passwords in an old style, but only for specific users:
SET PASSWORD FOR 'livecode_user'@'some_host' = OLD_PASSWORD('newpwd');

Hashes in an old format have 16 bytes, in a new one - 41. It is easy to check, which format is used:
SELECT Host, User, Password FROM mysql.user WHERE LENGTH(Password) = 16

Refer to original documentation for details, please:
https://dev.mysql.com/doc/refman/5.5/en/old-client.html
https://dev.mysql.com/doc/refman/5.5/en/password-hashing.html


Best regards,
Sergey Pashkov

_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina






More information about the use-livecode mailing list