The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I connect to a database from another server?

Discussion in 'General Discussion' started by chris8lunch, Oct 6, 2006.

  1. chris8lunch

    chris8lunch Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    Don't I replace 'localhost' with the other server IP address?
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Yes, and you will probably need to setup an access host on the remote database
    to allow connections from outside it its own "localhost" either in the cpanel of the
    account you are connecting or directly from phpmyadmin or any other way you
    edit your user and permissions.
     
  3. ajitharavindan

    ajitharavindan Registered

    Joined:
    Jan 19, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    QUOTE=jayh38;275701]Yes, and you will probably need to setup an access host on the remote database
    to allow connections from outside it its own "localhost" either in the cpanel of the
    account you are connecting or directly from phpmyadmin or any other way you
    edit your user and permissions.[/QUOTE]



    how to setup a connection to the remote database..
    what is the format...
    for example...
    i have created a database with the name CatchQatar and our domain name is www.catchqatar.com
    how can we specify it in the java connection string:confused::confused:
     
  4. nabuhonodozor

    nabuhonodozor Member

    Joined:
    Jun 22, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    afaik, You ll have to permit external acces to this database in the cPanel (mysql section)
    Database should be then accessible on port # 3306 (www.catchqatar.com:3306)
    If You have installed firewall on your server (apf or CSF) You will also have to open this port in firewall.
    salam allaikum & regards,
    piotr
     
Loading...

Share This Page