It would be very unusual for what you describe to be happening. The best way to test your ability to connect to the database would be to save this script as "mysql_test.php" in your nsHosting package and visit it. Just be sure to update the script with your database connection specifics. If you get anything except "Connection was successful!" please post the error it so we can take a look at what's going on.
CODE
<?php
/* Modify with your specifics */
$server = "server_alias";
$user = "db_username";
$pass = "db_password";
$db = "db_name";
$con = mysql_connect($server, $user, $pass) or die(mysql_error());
mysql_select_db($db, $con) or die(mysql_error());
echo "<h3>Connection was successful!</h3>";
?>