469,282 Members | 1,955 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

Connect to MySQL database from another host.

I am trying to connect to MySQL database at on host (DBhost) from another host (PROGRAMhost).

While I try to connect to the database at DBhost from DBhost itself the next is working fine for me:
mysql_connect("localhost","qdbname","dbpassword")

Now I am trying to find out what to use instead of localhost? I tried to replace localhost with host's url:port (I tried number of ports) but this is not working (even when I am connecting from DBhost itself). How can I find out what is the proper value to use instead of localhost?
Jul 16 '06 #1
1 4300
Banfa
9,064 Expert Mod 8TB
What are the locations of the 2 servers, are they on the same LAN?

The URL of the DBHost should work (I don't think a port is required) or alternatively the computer name or the IP Address (of the form 127.0.0.1 but with the right numbers obviously).
Jul 17 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by news.telia.net | last post: by
2 posts views Thread by Martin | last post: by
18 posts views Thread by Bruce A. Julseth | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.