Hi,
Yes I am using the right username and host, I can connect to the same database from command line and can successfully run select command however on the web page I get this error.
My Config file is as follows:
*******************************************************
<?php
$confg['db_uname'] = "www_data"; //your database username
$confg['db_paswd'] = "<pwd>"; //your database password
$confg['db_host'] = "mysql.mydomainname.com"; //usually localhost
$confg['db_dbase'] = "mydatabase"; //the database name
//$host="localhost";
########################################################
//create the function to log into the DB
function db_login() {
global $confg;
$link = @mysql_connect($confg['db_host'], $confg['db_uname'], $confg['db_paswd']) or die("Error connecting: " . mysql_error());
@mysql_select_db($confg['db_dbase'], $link);
}
//function for logging out from the DB
function db_logout() {
@mysql_close($link);
}
//$dbh=mysql_connect ("localhost") or die ('I cannot connect to the database because: ' . mysql_error());
//mysql_select_db ("blog") or die('I cannot select the database because: ' . mysql_error());
?>