Jump to content


connect to mysql question

  • Please log in to reply
1 reply to this topic

#1 realjumper

  • Members
  • PipPipPip
  • Advanced Member
  • 399 posts

Posted 06 September 2006 - 09:19 PM

Apologies if this isn't the right forum, but I hope someone could help me with this issue. We have 2 serrvers here.....one is the web server and the other is the Intranet server. The staff database is kept on the Intranet server and the web stuff is kept on the web server.

The Intranet is only avaliable on campus.

Now I have a need to develop.....(actually I already did the developing).....an application that queries both databases.....which are on different servers. The application is hosted on the webserver, with a connection to applicaton database as per the norm like this is fine:


// Make a MySQL Connection
mysql_connect("localhost", "username", "password") or die(mysql_error());
mysql_select_db("file_admin") or die(mysql_error());


But I also need to query the Intanet server. I can't seem to connect to the Intranet server. I have tried using the ip like this, which I thought would work....but apparently not


// Make a MySQL Connection
mysql_connect("", "username", "password") or die(mysql_error());
mysql_select_db("staff_db") or die(mysql_error());


Is it not possible to connect via ip?

#2 AdRock

  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 06 September 2006 - 09:31 PM

don't know if this would help

If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users