Jump to content


Photo

Using different ports to connect to mysql db


  • Please log in to reply
1 reply to this topic

#1 oracle259

oracle259
  • Members
  • PipPipPip
  • Advanced Member
  • 119 posts

Posted 26 September 2006 - 10:57 PM

How do i tell the PHP script what port to use to connect to the mysql db.

I have been trying


$conn = mysql_connect($dbhost:$dbport, $dbuser, $dbpwd);

but i doesnt seem to work. Help

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 27 September 2006 - 08:15 AM

Try this:
$conn = mysql_connect($dbhost . ':' . $dbport, $dbuser, $dbpwd);





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users