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_tabl es($db_data[0]);
$num_rows2 = mysql_num_rows( $result2);
while($table_da ta = 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\wwwr oot\PHP4info.ph p on line 5Warning: mysql_list_dbs( ):
supplied argument is not a valid MySQL-Link resource in
c:\inetpub\wwwr oot\PHP4info.ph p on line 6Warning: mysql_num_rows( ): supplied
argument is not a valid MySQL result resource in
c:\inetpub\wwwr oot\PHP4info.ph p on line 7Warning: mysql_fetch_row ():
supplied argument is not a valid MySQL result resource in
c:\inetpub\wwwr oot\PHP4info.ph p on line 9What did I do wrong ?The database
is running well.Best regardsKlaus Hansen
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_tabl es($db_data[0]);
$num_rows2 = mysql_num_rows( $result2);
while($table_da ta = 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\wwwr oot\PHP4info.ph p on line 5Warning: mysql_list_dbs( ):
supplied argument is not a valid MySQL-Link resource in
c:\inetpub\wwwr oot\PHP4info.ph p on line 6Warning: mysql_num_rows( ): supplied
argument is not a valid MySQL result resource in
c:\inetpub\wwwr oot\PHP4info.ph p on line 7Warning: mysql_fetch_row ():
supplied argument is not a valid MySQL result resource in
c:\inetpub\wwwr oot\PHP4info.ph p on line 9What did I do wrong ?The database
is running well.Best regardsKlaus Hansen
Comment