linking between 2 databases (on different servers)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I use 2 servers containing separate content.  The content is accessed
using the same username and password.  I have the ip remote server address
for one of the servers but the second server providers are refusing to
hand out the same information because of security concerns.  The info I
store on this second server does have to be kept safe.  Is there a way of
creating a link between the databases using php code which does not
require the ip address of the second server?  I do not want to compromise
on security.  Thank you for your time.  ANF


+-----------------------------[ SERVER SIGNATURE ]--+
| Article posted via Web Developer's USENET Archive |
|          |
| Web and RSS gateway to your favorite newsgroup -  |
|                   comp.lang.php                   |

Re: linking between 2 databases (on different servers)

On 10/29/2010 6:50 PM, ANF wrote:
Quoted text here. Click to load it

How are you going to access the database if you can't access the server?

Additionally, many hosts firewall databases from external access for
security reasons.  If that's the case, it wouldn't be accessible no
matter what.

But this isn't really a PHP question - it's a database question.  What
you're asking pertains to any programming language - but only to the
database(s) in question.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: linking between 2 databases (on different servers)

On 10/29/2010 07:50 PM, ANF wrote:
Quoted text here. Click to load it

You could write a PHP service in the other side, which can process some
(because of obvious potential security issues) pre-made queries and
return them to your script, all the communication being made through curl.

The only issues would be, bandwidth consumption (might not worry you in
some cases), and delay because of the communication between servers.

Re: linking between 2 databases (on different servers)

responding to
ANF wrote:

ANF wrote:

Quoted text here. Click to load it

Thanks for your effort.  I have no background in php or MySql but I'm
learning quickly because this has called a halt to the website
development.  If anyone has further suggestions please send them to me.
The username/password registration occurs on the more secure server (if
not handing out remote connection ip addresses makes the second more
secure).  The first server contains content which is accessed via
username/password stored on the other server database.  In effect the
databases have to link.  I did think of storing a table with
authentication details on the first server - a copy of the registration
table on the second server.  Thus authentication takes place directly.
However, I've been told it is not a good idea to have two tables with the
same info for the same purpose in php.  MySql provide a 'federated engine'
solution for cross server access but I don't think that applies here as
quieries (it seems to me) are only one way.  Again, any ideas would be
most welcome.  ANF


Re: linking between 2 databases (on different servers)

On Sat, 30 Oct 2010 10:35:13 +0000, ANF wrote:
Quoted text here. Click to load it

It's a database issue, and not one that you can solve directly with PHP.
You cannot access the second database system, nor can you access the
information on it. The only way to make it happen is to get the data
onto the database system than you CAN access. Therefore, it's a DATABASE
problem that requires a DATABASE fix.

If any foreign minister begins to defend to the death a "peace
conference," you can be sure his government has already placed its
orders for new battleships and airplanes.  -Joseph Stalin

Site Timeline