Code:
$link = @mysql_connect("$DB_HOST", "$DB_USER", "$DB_PASS");
$db_selected = mysql_select_db($DB_DB, $link);
always works for me. set the variables above the connect line and you're good to go. check with your server admin, perhaps your databases aren't properly setup. It has nothing to do with the host IP as you're at least getting a reply.