You are here: Connection PHP4 <> Mysql ? « PHP Programming Language « IT news, forums, messages
Connection PHP4 <> Mysql ?

Posted by Klaus Hansen on 06/03/05 15:35

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация