Is it possible to access mysql DB from another server?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

elf0024

Thread Starter
Joined
Sep 21, 2007
Messages
27
Hi everyone,

I'm quite wondering if I could access the mysql DB from another server in PHP.
Let's say my website is abc.com and another website is xyz.com
I would like to know if I can access xyz.com's DB from abc.com's php script (assume I have been accepted to be able to access its DB by xyz.com's owner) and update tables.
Wow I'm not attempting to hack or want to know the way of hacking. :;)
I want to make a website and offering a service, but it needs to connect to customer's DB from my server.

Anyone has any ideas??? (y)(y)
 
Joined
Apr 14, 2001
Messages
2,382
It would depend on whether the database accepts tcp/ip connections and has a defined IP address. Most do not so it may not be possible.
 

tomdkat

Retired Trusted Advisor
Joined
May 6, 2006
Messages
7,148
I want to make a website and offering a service, but it needs to connect to customer's DB from my server.
Sequal7 is right. Since your customer would have the MySQL database to which you would need to connect, you would have to inform your customer of the requirement of configuring their database to allow the remote connection from your server. If they can make that happen, you should be able to connect just fine. :)

Peace...
 

elf0024

Thread Starter
Joined
Sep 21, 2007
Messages
27
Thanks Mudley,

How could I do that on cPanel??

Could you please let me know??
And if I do that, is there any security issues??

Thanks a lot!
 
Joined
Apr 6, 2008
Messages
101
if its enabled on the server (and in cpanel), there will be a Remote Database Access Hosts section
the icon should appear with the other database icons

i think in older versions of cpanel the remote hosts was actually on the mysql db/user page...but i can't remember

adding a remote host is as simple as adding the IP of the server (the one that needs access)

as far as security, yeah, its a risk - especially if the server doing the accessing is a shared server
don't get me wrong though, its not an easy in...but it does create one more means of entry

my server has it enabled for MY ip
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top