connecting to offsite databases

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
thegreatone2176
Forum Contributor
Posts: 102
Joined: Sun Jul 11, 2004 1:27 pm

connecting to offsite databases

Post by thegreatone2176 »

i searched the forums and didnt find a thread about this even though im sure there would be one

someone asked me if i could do this for them:

he runs two sites that are membership required and hes getting a third site and he wants when people register on one to be registered on all three...

first off i know that if more than one mysql server runs off localhost then i dont think it would be possible, but if only one did then users could register from the site containing that one.

so if none or one of them runs on localhost could i connect to the database of site A from site B?

I dont see why not but since i dont have his ftp+sql details yet i cant test and i dont have multiple sites of my own to test
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's possible in the connect function of the database architecture you use. However, most hosts disallow access from outside localhost to the database. So you will very likely need a script on the all the servers for each of them to access each other, to perform selections, insertions and updates. I'd strongly suggest using strong encryption to pass information.
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Please post in the appropriate forum. Your question is about databases, we have a forum called "Databases". Coincidence? I think not. :wink:
Post Reply