1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Is it possible to access mysql DB from another server?

Discussion in 'Web Design & Development' started by elf0024, Apr 7, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. elf0024

    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)
     
  2. Sequal7

    Sequal7

    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.
     
  3. tomdkat

    tomdkat Retired Trusted Advisor

    Joined:
    May 6, 2006
    Messages:
    7,148
    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...
     
  4. elf0024

    elf0024 Thread Starter

    Joined:
    Sep 21, 2007
    Messages:
    27
    Thanks guys!
    I might have to find more information :)
     
  5. Mudley

    Mudley

    Joined:
    Apr 6, 2008
    Messages:
    101
    its pretty easy to configure if the server has cpanel
     
  6. elf0024

    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!
     
  7. Mudley

    Mudley

    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
     
  8. Sponsor

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 733,556 other people just like you!

Loading...
Similar Threads - possible access mysql
  1. pyhton999
    Replies:
    2
    Views:
    400
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/701478

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice