Prova così..

<?php
$cns = @mysql_connect("localhost", "root", "password");
if (!$cns) {
echo '

Unable to connect at the database server at this time. </p>' ;
}
echo '

Connected to the database server.</p>' ;
?>