Hi,
you can use both the ip address or the hostname of the mysql server.
Examples:
mysql_connect("mysql.something.com",$user,$pass)
mysql_connect("mysql",$user,$pass)
mysql_connect("192.168.12.10",$user,$pass)
Make sure that the client host has the rights to access the mysql server.
T.