Issue with PHP 5.0.4 and MySQL 4.1+
// July 31st, 2006 // No Comments » // Databases, Web Development
Now, this is quite an interesting little issue, and one which I discovered whilst trying to set up this very blog – the famous 5 minute install turned into a much less famous, though equally prolific I’m sure, 3 hour install – I’m used to it though, I’m a software developer afterall!
Anyway, the issue revolves around the MySQL client version that’s bundled with versions of PHP prior to 5.1 (I’m not sure if this version suffers from the same problem). The client version is 3.23.58 and it turns out that it doesn’t support the new password encryption format being used in MySQL versions 4.1 and above. What a pain.
“So what options does one have?” I hear you cry.
- You can install MySQL v4.0.xx (I’ve invested enough time with v5.0 so not likely!)
- Try upgrading to the very latest version of PHP hoping that their MySQL client is an updated (I’m not 100% if this will solve the problem – certainly I tried this and had no success. MySQL is also disabled by default in PHP 5 so there is an extra level of configurmuration)
- Enable a flag telling MySQL to use the old password method (I chose this option in the end)
If you have MySQL Administrator GUI installed, you can use it to connect as ‘root’ and check the flag to use old password under the server configuration tab. Alternatively, you can run mysql with the –old-passwords flag, which does exactly the same thing.
Deep joy!



