Cross Site MySQL intergration

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
Glycerine
Forum Commoner
Posts: 39
Joined: Wed May 07, 2008 2:11 pm

Cross Site MySQL intergration

Post by Glycerine »

I know its possible to access a MySQL database at say 'exampleB.com' from 'exampleA.com' but I'm not sure if I trust it. Is it safe? I would like to do that for many sites - for a global login system - would I need a basic encryption method? I'm trying to stay away from secure sockets cus... well... I'm lazy 8O

Thanks in advance.
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Re: Cross Site MySQL intergration

Post by Mordred »

"Trust" (and by extension "sure") is a matter of personal choice. Do you trust the remote database or not?
If you find it hard to answer this, it will be easier if you can say why you are not completely sure.
Otherwise - yes, it's possible, and the modern mysql clients use encrypted transport (I'm not sure on the details though) in a wholly transparent manner.
Glycerine
Forum Commoner
Posts: 39
Joined: Wed May 07, 2008 2:11 pm

Re: Cross Site MySQL intergration

Post by Glycerine »

I do trust database number 2, its mine - the initial database is a website I'm doing. I want to create a sort of global pass system for all my sites - And if you say MySQL is encrypted I have nothing to worry about as long as my password is up to scratch.

Then I came across another thought - Many of my site are hosted with my reseller package. As such - there all on the same host - and I reckon pretty much on the same storage (I get the same MySQL naming extension with many of my sites - when I created a new account, a different extension was given) with this in mind - I doubt the information will go any further that the companies lan. Does that sound plausible?
Bruno De Barros
Forum Commoner
Posts: 82
Joined: Mon May 12, 2008 8:41 am
Location: Ireland

Re: Cross Site MySQL intergration

Post by Bruno De Barros »

If you're in a reseller account, and all your accounts are on the same server, just access the database normally, mysql_connect('localhost','extension_user','password'); mysql_select_db('extension_user'). You can access any of the databases on your reseller's account like that, from any of your accounts (as long as you know the username and password details).
Glycerine
Forum Commoner
Posts: 39
Joined: Wed May 07, 2008 2:11 pm

Re: Cross Site MySQL intergration

Post by Glycerine »

Thanks - Helped greatly.
Post Reply