Page 1 of 1

Connecting to MySQL 4.1.10 in PHP error

Posted: Mon Feb 28, 2005 1:50 pm
by Swede78
I'm in the process of moving servers right now. I decided to upgrade to the latest stable versions of MySQL (4.1.10) and PHP (4.3.10).

I believe everything is working ok, except that when I try to connect to MySQL, I get the following error:

"Client does not support authentication protocol requested by server; consider upgrading MySQL client"

This is the code I use to make a connection:

Code: Select all

$hostname_connUser = "localhost";
$database_connUser = "*****";
$username_connUser = "*****";
$password_connUser = "database_user";
$connUser = mysql_connect($hostname_connUser, $username_connUser, $password_connUser) or die(mysql_error());
I can connect to the database using other programs. Does anyone how I need to upgrade my code to make it work?

Posted: Mon Feb 28, 2005 2:08 pm
by feyd
you need to use a newer mysql client api for php.. this is mysqli, but I think that only works through php5 correctly..

Posted: Mon Feb 28, 2005 2:22 pm
by Swede78
feyd,

Yes I was just reading about the mysqli. I didn't see anything about it not working with PHP 4.3.10, but I also could not find instructions on installing it on a Windows machine.

I've been having a difficult time with this new version of MySQL. I really liked the new installation package. Very easy, but I've been having a lot of problems connecting to it (with programs other than PHP also).

So, my solution is to uninstall it and go with an older version of MySQL. The version I was using ( 4.0.18 ) worked just fine for everything I was using it for.


Thanks anyway!
Swede