If your MySQL server runs on default settings, you don't have to specify that.
The default MySQL port is 3306.
[updated to show mysql_error() usage]
$conn = mysql_connect($dbhost, $dbuser, $dbpass)
or die('Error connecting to mysql: '.mysql_error());
Join the SQL Course by Intellipaat fast, to Learn SQL concepts in detail and get certified.