problem in connection with db
Posted: Fri Jul 28, 2006 8:42 am
connection.php code
Error:
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /home/videocli/public_html/connection.php on line 11
Client does not support authentication protocol requested by server; consider upgrading MySQL client
Code: Select all
<?php
/*
$host="localhost";
$dbUser="videocli_vc4s";
$dbPasw="vc4s";
$dbName="videocli_vc4s";
//$dbLink="";
$dbLink=mysql_connect($host, $dbUser, $dbPasw) or die("Can't connect to db ".mysql_error());
*/
$dbh=mysql_connect ("localhost", "videocli_mike", "mike") or die (mysql_error());
mysql_select_db ("videocli_vc4s");
// mysql_select_db($dbName, $dbLink) or die("Can't use db ".mysql_error());
//Save traffic history
function save_traffic_log($storeid)
{
$ref_site = $_SERVER['HTTP_REFERER'];
//echo $ref_by;
$ref_domain = str_replace("http://", "", $ref_site);
$firstslash = strpos($ref_domain, "/");
$ref_domain = substr($ref_domain, 0, $firstslash);
$host = $_SERVER['REMOTE_ADDR'];
$time = time();
$save_log = @mysql_query("INSERT INTO `statistics` ( `store_id`, `store_type` , `ref_site` , `ref_domain` , `host` , `time` ) VALUES ('$storeid', 'clip', '$ref_site', '$ref_domain', '$host', '$time')");
}
?>Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /home/videocli/public_html/connection.php on line 11
Client does not support authentication protocol requested by server; consider upgrading MySQL client