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? Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
fenway Posted February 22, 2007 Share Posted February 22, 2007 Yes, it's a hashed password. Quote Link to comment 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? Quote Link to comment 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(). Quote Link to comment 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? Quote Link to comment 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') Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
virtuexru Posted February 26, 2007 Author Share Posted February 26, 2007 Solved!! Thank you Artacus. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.