normally I would use this code if I use my own apache server:

$dbh = mysql_connect ("localhost","root","password") or die ('I cannot connect to the database because: ' . mysql_error());

It workes just fine. But how could I connnect to mysql if the PHP script is located on another server?
The other server does have PHP functions.

I have tried stuff like:

$dbh = mysql_connect ("my ip adress","root","password") or die ('I cannot connect to the database because: ' . mysql_error());

and

$dbh = mysql_connect ("my ip adress/localhost","root","password") or die ('I cannot connect to the database because: ' . mysql_error());

I might be way OFF , thanks for the help guys.