authentication protocol error. Please Help!

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
yosuke_
Forum Commoner
Posts: 64
Joined: Tue Apr 13, 2004 12:29 pm

authentication protocol error. Please Help!

Post by yosuke_ »

Hi!
Im new to MySQL database and PHP, but I have one problem. I created a database, Created new user account for with all privileges. But when I try to connect to database I get this error:
mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client
And my code is this:

Code: Select all

<?php
mysql_connect("localhost","yosuke", "password");
mysql_select_db("myData");

$SQL = "SELECT * FROM users";
$Query = mysql_query($SQL);
while ($results = mysql_fetch_array($Query));
echo $results["firstname"];
?>
What is wrong? I have MySQL 5. Please help me. Thank you!
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

You are going to need to look in your PHP.ini file and see what your authentication protocal is
yosuke_
Forum Commoner
Posts: 64
Joined: Tue Apr 13, 2004 12:29 pm

Post by yosuke_ »

I searched php.in file for authentication, and this is only thing what I found:

; Use NT authentication when connecting to the server
mssql.secure_connection = Off

any ideas?
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

I have MySQL 5
Might want to look at the mysqli functions as they are much more suited to MySQL 4.1.2 or above.
Post Reply