Connecting to MySQL 4.1.10 in PHP error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Swede78
Forum Contributor
Posts: 198
Joined: Wed Mar 12, 2003 12:52 pm
Location: IL

Connecting to MySQL 4.1.10 in PHP error

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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..
Swede78
Forum Contributor
Posts: 198
Joined: Wed Mar 12, 2003 12:52 pm
Location: IL

Post 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
Post Reply