MySQL From Another Server?

Discussion in 'Site & Server Administration' started by WebDivx, Dec 10, 2006.

  1. #1
    Is it possible to run a MySQL database from another server? Like if I have my site on Bluehost.Com, can I a MySQL database I have from a site hosted on Globat.Com?

    (the above is just an example...i actually have a server of my own and wanted to know if I could use my servers MySQL database from a shared hosting server)
     
    WebDivx, Dec 10, 2006 IP
  2. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #2
    Have you tried replacing "localhost" with the IP of your dedicated server?
    I think that will work.
    Bye :)
     
    JEET, Dec 10, 2006 IP
  3. Thibaut

    Thibaut Well-Known Member

    Messages:
    886
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Hello,

    you simply need to use the IP adress (or the hostname) instead of localhost (127.0.0.1) while using scripts (PHP, Perl or anything else)
    You must also be sure your target server will accept any Mysql transaction (TCP + SQL authorization)

    Hope this helps.

    Cheers !
     
    Thibaut, Dec 11, 2006 IP
  4. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #4
    Yeah add accesshosts in your control panel software, by default MySQL only allows 127.0.0.1 ( localhost ) to access the service.
     
    krakjoe, Dec 11, 2006 IP
  5. WebDivx

    WebDivx Peon

    Messages:
    212
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    really, it does? thats so cool! but I dont have a control panel with an option to put access hosts. does anybody know how to do that using SSH?

    thanks!
     
    WebDivx, Dec 11, 2006 IP