By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,397 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

Connection PHP4 <> Mysql ?

P: n/a
Hi all

Using Windows XP, PHP4.3.11 and Mysql 4.1.

Im a newbie to PHP and Mysql.
Im trying to connect to the database with this script:

<?php
//list_db.php

$link_id = mysql_connect("localhost", "phpuser", "phppass");
$result = mysql_list_dbs($link_id);
$num_rows = mysql_num_rows($result);

while($db_data = mysql_fetch_row($result)) {
echo $db_data[0]. "<BR>";
$result2 = mysql_list_tables($db_data[0]);
$num_rows2 = mysql_num_rows($result2);
while($table_data = mysql_fetch_row($result2)) echo "--" .
$table_data[0]. "<BR>";
echo "==> $num_rows2 table(s) in " . $db_data[0] . "<P>";
}
?>
But it gives me this error:Warning: mysql_connect(): Client does not support
authentication protocol requested by server; consider upgrading MySQL client
in c:\inetpub\wwwroot\PHP4info.php on line 5Warning: mysql_list_dbs():
supplied argument is not a valid MySQL-Link resource in
c:\inetpub\wwwroot\PHP4info.php on line 6Warning: mysql_num_rows(): supplied
argument is not a valid MySQL result resource in
c:\inetpub\wwwroot\PHP4info.php on line 7Warning: mysql_fetch_row():
supplied argument is not a valid MySQL result resource in
c:\inetpub\wwwroot\PHP4info.php on line 9What did I do wrong ?The database
is running well.Best regardsKlaus Hansen
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Klaus Hansen wrote:
Im a newbie to PHP and Mysql.
Im trying to connect to the database with this script: [...] But it gives me this error:Warning: mysql_connect(): Client does not support
authentication protocol requested by server; consider upgrading MySQL client What did I do wrong ?


This should be an FAQ here. ;-)

Use the --old-passwords option for the MySQL server. Check the MySQL
webpage for details.

http://dev.mysql.com/doc/mysql/en/old-client.html
Jul 17 '05 #2

P: n/a
your mysql module is for other versions not for 5, look for mysql module for
version 5
Client does not support

authentication protocol requested by server; consider upgrading MySQL client
--
bebbet.kicks-ass.net
up/up
1024
status: http://bebbet.kicks-ass.net/aa1/
Jul 17 '05 #3

P: n/a
or since your hosting a webserver on your pc and using xp and want to
have php, cgi, mysql, and more then i suggest you download this and it
comes with everything you need just click click and its done
installed..

http://prdownloads.sourceforge.net/a...2.exe?download

comes with PHP5 and MYSQL5 so good luck..

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.