I have a WordPress-based log, hosted on Dreamhost. I’m on Snow Leopard and I wanted to install local site, that will connect to my remote database. However, this does not work and I get this error:
mysqlnd cannot connect to MySQL 4.1+ using old authentication
I did not try to do this in Leopard, so I don’t is it new thing in SL or was an error in Leopard as well.
How to solve/workaround this?
I have resolved this.
The issue indeed was due to Snow Leopard’s default of using mysqlnd as the module for PHP 5.3 it ships with, not with Dreamhost. That module flatly refuses to connect with servers using OLD_PASSWORD hash.
The only solution to this (as I can’t change MySQL settings on shared hosting) is to recompile your own PHP, that will not use mysqlnd but mysql/mysqli. Took me 3h to figure out the correct ./configure for it to work (I’m far from fluent in this area, so it was hit and miss). Searching through the net, various options worked for various people.
No idea will this work or others, it did worked for me like this:
Get libpng and compile, install into /usr/local/libpng
Compile latest MySQL, per hivelogic.com instructions
Set to use 64bit
Use this for configure PHP (I used 5.2.11, does not really matters to me as long as it’s 5.x)
Again, I’m rookie with all this, need PHP just to run local wordpress, so use at your own risk.