zyonsherlock Posted October 9, 2006 Share Posted October 9, 2006 i've got a problem with my query, at first i thought it was in my php script, but it doesn't return any error. after that i run my query in mysql prompt, it seems that whenever i run a query with a "where password = password("password");", it returns an empty set. I search for some answers here and in other online forums, even in mysql ab but nothing helped me with this problem. i'm searching for errors for the past 2 days already, i don't know what to do with this, it's making me nuts already! anyone? help? please? :'( all answers are welcome...thanks in advance! Quote Link to comment Share on other sites More sharing options...
alpine Posted October 9, 2006 Share Posted October 9, 2006 Not sure, but this might be the password() compability issue in MySql 4.1 and later: http://dev.mysql.com/doc/refman/5.1/en/application-password-use.html Quote Link to comment Share on other sites More sharing options...
zyonsherlock Posted October 10, 2006 Author Share Posted October 10, 2006 i'm using mysql 5.0.22, i'm using wamp, is wamp has something to do with my problem? Quote Link to comment Share on other sites More sharing options...
btherl Posted October 10, 2006 Share Posted October 10, 2006 What happens if you do "SELECT password("password")", and then do a query using the output of that? Are there any matching columns? And does the output of that first query make sense? Quote Link to comment Share on other sites More sharing options...
zyonsherlock Posted October 10, 2006 Author Share Posted October 10, 2006 when i do the select "password('password')", it shows the encrypted version, but the encrypted version is 1 (letter or number) longer than the one that was selected in "select * from table;" . e.g. mysql>select * from users;user passwordduh p102p394kr843poukmysql>select password('password'); password('password') p102p394kr843pouk[b]e[/b]When i copy that encrypted one and make a query for it, it still returns an empty set e.g. select username, password where username="duh" and password = "1o2j43ik4j34kjoipo"; is it the encryption of passwords?coz i think thats the problem. i've been stuck with this problem for the past 3 days already, and i dont find any typo errors or any errors at all with my query, if thats the problem, what should i do? Quote Link to comment Share on other sites More sharing options...
fenway Posted October 10, 2006 Share Posted October 10, 2006 Are you sure you're not accidentally truncating the encrypted password? Quote Link to comment Share on other sites More sharing options...
zyonsherlock Posted October 12, 2006 Author Share Posted October 12, 2006 hi! thanks for your help! i solved my problem a while ago. i've read the documentation of mysql for this one and i've learned that my problem was my password length, it was set to 40, it must be set to at least 41 bytes so that it can accomodate the long hashes, i've set mine to 45 just in case, thanks again!!! ;D Quote Link to comment Share on other sites More sharing options...
zyonsherlock Posted October 12, 2006 Author Share Posted October 12, 2006 just in case someone sees this topic and want some more information about it check this link: [url=http://dev.mysql.com/doc/refman/4.1/en/password-hashing.html]dev.mysql.com/doc/refman/4.1/en/password-hashing.html[/url]. this link end my 3day brain seizure! ;D 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.