Jump to content

Archived

This topic is now archived and is closed to further replies.

oracle259

Using different ports to connect to mysql db

Recommended Posts

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

I have been trying


[code]$conn = mysql_connect($dbhost:$dbport, $dbuser, $dbpwd);[/code]

but i doesnt seem to work. Help

Share this post


Link to post
Share on other sites
Try this:
[code=php:0]$conn = mysql_connect($dbhost . ':' . $dbport, $dbuser, $dbpwd);[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.