Helpful Design

Recent Posts

Archives

Wednesday, January 04, 2006

MySQL Problem

I was working to get port an old website from one machine to another, both using PHP and MySQL, when PHP kept throwing up this problem:

mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client

I did a bit of scouring the web and realised that the password hashing algorithm in the newer MySQL has changed. So when I’d set the password for the website to use the database, it had set it using the new password hashing algorithm, which PHP doesn’t use. The way to get around this is to set the password like so:

SET PASSWORD for [user]@[machine] = OLD_PASSWORD(’[password]’);

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home