MySQL PHP incompatibility.
- by Evernoob
Ok maybe I've overlooked something really simple here, but I can't seem to figure this out.
I'm running WAMP locally, but connecting to a remote MySQL database. The local version of PHP is the latest 5.3.0.
One of the remote databases, being version 5.0.45 works fine. However, the other remote database I'm trying to connect to, which is version 5.0.22 throws the following error before dying:
Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected. PID=5880 in ...
Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using old authentication in ...
WTF?
UPDATE:
Reverting to PHP 5.2.* i.e. anything lower than 5.3.0 resolves the problem completely. As long as I am not running 5.3.0 I can connect to both databases. I'm not sure what the explanation is for this weirdness.