Jump to content

authentication error - found fixes but they don't work for me


ahs10

Recommended Posts

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.....

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.