Jump to content

connect to mysql question


realjumper

Recommended Posts

Hi,
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:

[code]
<?php

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

?>
[/code]

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

[code]
<?php

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

?>
[/code]

Is it not possible to connect via ip?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.