Apparently the board thought that you meant to insert a smiley by typing colon port (": p", without space). But yes, that is the correct syntax. Just add the port number after the host name in mysql_connect():
mysql_connect("localhost:3309", "username", "password");