ahs10 Posted January 15, 2010 Share Posted January 15, 2010 so the error is..... mysqlnd cannot connect to MySQL 4.1+ using old authentication this only happens when php tries to connect to mysql, using a sql gui app (like sequel pro) works just fine. i've found solutions on the net like http://www.digitalpeer.com/id/mysql and a couple of posts even in these forums.... but the suggested fix isn't working for me. i used SET PASSWORD to update my mysql.user table to the new hashed password using the PASSWORD() function. i verified the length of the passwords stored in this table are 41 characters... not 16... and it still gives me this error. would it help to re-install mysql? i see lots of room for error there, so i don't want to do that unless i have to. what about installing a downgraded version of php... one that doesn't use mysqlnd? again, lots of room for error there so i'd really prefer not too. any help or guidance... especially the kind that does not involve installing or re-compiling anything, would be greatly appreciated. cheers! php version 5.3.0 mysql version 5.1.8 mac os x snow leopard server 10.6.2 Quote Link to comment https://forums.phpfreaks.com/topic/188623-authentication-error-found-fixes-but-they-dont-work-for-me/ Share on other sites More sharing options...
fenway Posted January 16, 2010 Share Posted January 16, 2010 You need to use OLD_PASSWORD(). Quote Link to comment https://forums.phpfreaks.com/topic/188623-authentication-error-found-fixes-but-they-dont-work-for-me/#findComment-996194 Share on other sites More sharing options...
ahs10 Posted January 18, 2010 Author Share Posted January 18, 2010 thanks for the reply =) using OLD_PASSWORD() does not resolve my issue, but i'm curious as to why you suggested. maybe my understanding of the situation is incorrect, so i'd like to find out more from you if you can spare a moment please. my understanding is that in the user table of the mysql database i transferred over to my new snow leopard server... it contained passwords hashed with an old algorithm, that resulted in a hashed password 16 characters long. to generate the hash of this type you would user the OLD_PASSWORD() function. the new version of php uses mysqlnd which won't allow connections using this type of password. it requires that you use a new hashing algorithm that results in a 41 character hashed password. you would use PASSWORD() function to generate this password. why did you suggest using OLD_PASSWORD()? am i missing something here? i feel like i have a basic misunderstanding of the problem here because this seems so easily solved for everyone else on the net. your time is greatly appreciated. cheers! Quote Link to comment https://forums.phpfreaks.com/topic/188623-authentication-error-found-fixes-but-they-dont-work-for-me/#findComment-997501 Share on other sites More sharing options...
fenway Posted January 18, 2010 Share Posted January 18, 2010 I'm talking about this. Quote Link to comment https://forums.phpfreaks.com/topic/188623-authentication-error-found-fixes-but-they-dont-work-for-me/#findComment-997510 Share on other sites More sharing options...
ahs10 Posted January 18, 2010 Author Share Posted January 18, 2010 oh... ok. yea, this article shows you how to essentially revert back to using the old password method. mysql actually advises against this... obviously there were reasons behind changing the algorithm in the first place. i really want to stay away from decreasing security on my server. i just don't get it. i have the most up to date version of mysql and php running. hashing the password with the new algorithm should work..... as any multi-day computer issue i found myself lost in.... this really should not be this difficult. i'm sure i'll hit myself in the head when i do figure it out. thanks again though..... Quote Link to comment https://forums.phpfreaks.com/topic/188623-authentication-error-found-fixes-but-they-dont-work-for-me/#findComment-997525 Share on other sites More sharing options...
fenway Posted January 20, 2010 Share Posted January 20, 2010 Then you mysql(i) libraries aren't up to date. Quote Link to comment https://forums.phpfreaks.com/topic/188623-authentication-error-found-fixes-but-they-dont-work-for-me/#findComment-998451 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.