Are you sure that the Server to which you are trying connection is accessble?
Assuming that the database you are using is Developed using MYSQL:
$connect = mysql_connect("localhost","","");
but if the server is like www.xxx.yyy, then
you should enter as follows:
$connect = mysql_connect("www.xxx.yyy", "username", "password");
May be if you are using phpMyAdmin, try to change the server, username, an password to the one you are going to connect in config.inc.php file,
bye...