virtuexru Posted February 22, 2007 Share Posted February 22, 2007 OK.. Here's the problem.. I upgraded from Version 4 to Version 5 today. I had a table with users on it that had the MD5 password scramble thing. But after converting to version 5, I can't login anyone? I'm assuming this has to do with whether or not I updated with LATIN or UTF or blabla, but I'm clueless as to that! Everything else works, what do I need to do to restore passwords? Link to comment https://forums.phpfreaks.com/topic/39661-solved-need-emergency-help-upgraded-mysql-to-version-5-now-passwords-lost/ Share on other sites More sharing options...
fenway Posted February 22, 2007 Share Posted February 22, 2007 I had a table with users on it that had the MD5 password scramble thing. Huh? Link to comment https://forums.phpfreaks.com/topic/39661-solved-need-emergency-help-upgraded-mysql-to-version-5-now-passwords-lost/#findComment-191556 Share on other sites More sharing options...
virtuexru Posted February 22, 2007 Author Share Posted February 22, 2007 $request = "INSERT INTO tbl_auth_user values('$user_id',PASSWORD('$pass')" using the PASSWORD thing it scrambles the password when its in the actual MySQL Database itself Link to comment https://forums.phpfreaks.com/topic/39661-solved-need-emergency-help-upgraded-mysql-to-version-5-now-passwords-lost/#findComment-191592 Share on other sites More sharing options...
fenway Posted February 22, 2007 Share Posted February 22, 2007 Yes, it's a hashed password. Link to comment https://forums.phpfreaks.com/topic/39661-solved-need-emergency-help-upgraded-mysql-to-version-5-now-passwords-lost/#findComment-191597 Share on other sites More sharing options...
virtuexru Posted February 22, 2007 Author Share Posted February 22, 2007 That's what I meant, I apologize. Anyway, the "hashed" password, no longer works when I convert to MySQL 5 from version 4. Is there a workaround this? Link to comment https://forums.phpfreaks.com/topic/39661-solved-need-emergency-help-upgraded-mysql-to-version-5-now-passwords-lost/#findComment-191610 Share on other sites More sharing options...
artacus Posted February 22, 2007 Share Posted February 22, 2007 Yeah, that's because they changed they way their password() works from 4 to 5. Try OLD_PASSWORD(). Link to comment https://forums.phpfreaks.com/topic/39661-solved-need-emergency-help-upgraded-mysql-to-version-5-now-passwords-lost/#findComment-191614 Share on other sites More sharing options...
virtuexru Posted February 22, 2007 Author Share Posted February 22, 2007 OK. Well that makes sense, but what do I try OLD_PASSWORD() on? Just need a clarification? Where do I put that statement in, when someone tries to login? Link to comment https://forums.phpfreaks.com/topic/39661-solved-need-emergency-help-upgraded-mysql-to-version-5-now-passwords-lost/#findComment-191616 Share on other sites More sharing options...
artacus Posted February 22, 2007 Share Posted February 22, 2007 When you are logging there will be a query like: SELECT * FROM users WHERE user='$user' AND pword = OLD_PASSWORD('$pass') Link to comment https://forums.phpfreaks.com/topic/39661-solved-need-emergency-help-upgraded-mysql-to-version-5-now-passwords-lost/#findComment-191618 Share on other sites More sharing options...
artacus Posted February 22, 2007 Share Posted February 22, 2007 Look here: http://dev.mysql.com/doc/refman/5.0/en/password-hashing.html http://dev.mysql.com/doc/refman/5.0/en/old-client.html Link to comment https://forums.phpfreaks.com/topic/39661-solved-need-emergency-help-upgraded-mysql-to-version-5-now-passwords-lost/#findComment-191621 Share on other sites More sharing options...
virtuexru Posted February 26, 2007 Author Share Posted February 26, 2007 Solved!! Thank you Artacus. Link to comment https://forums.phpfreaks.com/topic/39661-solved-need-emergency-help-upgraded-mysql-to-version-5-now-passwords-lost/#findComment-194381 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.