try this:
$conn = mysql_connect("hostname", "mysql_user", "mysql_pass");
hostname is the host of the mysql server, if both mysql and webserver are on the same box, this would be "localhost". Also, check what port you have mysql listening to - if it is not the default, you have to tell PHP what port by appending the port to the hostname: "localhost:port" where port is the port number.
Also, you will have to select a database to use once you are connected:
mysql_select_db("database");