3rd party database, external host

Discussion in 'MySQL' started by cheapez, Sep 6, 2007.

  1. #1
    My friend have a phpbb forum and he want use the database from an external host. (from a second host server).
    We can move this database to his host server but We don't want this.

    If I want to use 3rd party database, how I'm going to do it?
    I want to connect to the database from the other host server

    Anyone know how to?
    Thanks.
     
    cheapez, Sep 6, 2007 IP
  2. ssanders82

    ssanders82 Peon

    Messages:
    77
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    In the database connect string, instead of putting "localhost", type the IP address of the external DB server. Make sure MySQL is configured to handle remote connections. Be aware that using an external server will slow down your site.
     
    ssanders82, Sep 6, 2007 IP
  3. cheapez

    cheapez Active Member

    Messages:
    1,123
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    78
    #3
    The database on the external host that I want to connect to is a "localhost". What is the ip of it? how am I going to find it. and what port should I use?

    Thanks
     
    cheapez, Sep 6, 2007 IP
  4. ssanders82

    ssanders82 Peon

    Messages:
    77
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If it's mysql, it's probably running on port 3306. This is the default install port.

    "localhost" means local to that computer; other servers will need to know its IP address. Put a php file on that external host with "phpinfo();" as the contents of the file, and run it. It will tell you all sorts of info about it.
     
    ssanders82, Sep 7, 2007 IP
  5. cheapez

    cheapez Active Member

    Messages:
    1,123
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    78
    #5
    I ran it, it tell all sorts of info, but doesn't tell the ip there
    I will find a way to find it

    Thank you for your answers. very helpful
     
    cheapez, Sep 7, 2007 IP
  6. fabriciogr

    fabriciogr Active Member

    Messages:
    958
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    73
    #6
    add this before or instead of the phpinfo()

    echo $_SERVER["SERVER_ADDR"];
     
    fabriciogr, Sep 9, 2007 IP