MySQL expects certain values to connect, namely the host (usually localhost) a user and a password if any for the user.
A default MySQL server right after install has one main user root and root has not password, so to connect to this brand new server with no permissions altered or changed yet you would connect like this
$host ="localhost"; //will work on a new MySQL
$user ="root"; //so will this
$pass = ""; // and this too
$connection = mysql_connect($host,$user,$pass)
or die("Could not connect to server") //You should not see this error
Normally you would have another page that has the configuration parameters (host, user and password) and use it as an include on those pages of your site that need to connect to the data base, so if you did that instead of writing the above and if you ever changed the parameters of the configuration to connect yu wouod just change them in that one file.
include("config.php");
$connect=mysql_connect($host, $user, $pass)
or die("Could not sonnect with database server!");
Depending on how your server and your PHP is set up you need to make sure that the php.ini is as below
;extension=php_msql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
If it is commented then get rid of the comment ";" and try it again.