the port is part of the server parameter in the connection eg port 3307 mysql_connect ( localhost:3307 , username , password )
http://www.php.net/manual/en/function.mysql-connect.php has the details HTH Peter ----------------------------------------------- Excellence in internet and open source software ----------------------------------------------- Sunmaia www.sunmaia.net tel. 0121-242-1473 ----------------------------------------------- -----Original Message----- From: Webmaster [mailto:[EMAIL PROTECTED]] Sent: 09 October 2002 15:57 To: [EMAIL PROTECTED] Subject: using php to connect to a 2nd mySQL server Hello all, I am new to this list ... and hope to find an answer to a question which has come up. On the server for my websites at my ISP, a mySQL server is installed to handle different customers' databases (1 database setup for each customer).... Now, as I have a need for a mySQL server where I can create/delete databases, my ISP agreed to install a 2nd mySQL server that can be dedicated to my sole use ... but I am told it would run on a different port number ... My question now is this: How can I tell a php script to not use the standard mySQL server that exists on this server computer, but to use the 2nd mySQL server that runs on the different port number ? Currently I use info set up in variables like this: # MySQL database config stuff $host="localhost"; $username="abcdefg"; $database="database"; $password="123456789"; Is it possible to add the port information somwhere? or does a php connection always use the standard mySQL port settings? Any help is greatly appreciated. Thanks! God bless you with His grace and peace Wolfgang Schneider -- BibelCenter: http://www.bibelcenter.de/ - "Come and See!" -- Bookstore: http://www.worthy.net/BibelCenter/ - "Great offers! Check it out!" -- email: mailto:[EMAIL PROTECTED] -- http://awesome.crossdaily.com/vote.php3?sid=952 -- Your Vote! --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php