if u do not use the default port number 3306, you have to specify it.. otherwise just write localhostuse mysql_pconnect seems better..$dbh = mysql_pconnect('localhost','user','password'); 
$dbh = mysql_pconnect('localhost:3306','user','password');both are correct if u use the default port.if use 3307, then
$dbh = mysql_pconnect('localhost:3307','user','password');