perhaps you are not logged in with the correct username/password combination
if you do have a correct user name/password then...
maybe the one you have doesn't have access to SELECT statments on that database and/or table
try doing this...
<?
$server = "localhost";
mysql_connect ($server, $user, $password) or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ($database) or die ("cannot connect to the datbase");
$result = mysql_query("SELECT * FROM databasename");
if ($result == 0)
{
echo("<b>Error " . mysql_errno() . ": " . mysql_error() . "</b>");
}
else
{
echo "the query worked!";
}
hopefully the error message generated gives you enough information to solve your problems. try usign localhost for your host name instead of your domain name.