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.

Remotely Connect to MySQL database on cPanel using Java

Discussion in 'Database Discussions' started by mobcdi, Aug 8, 2011.

  1. mobcdi

    mobcdi Well-Known Member

    Joined:
    Jul 13, 2009
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    I'm trying to allow a java app to connect to a cPanel accounts mysql database but am not sure if I have all the steps and settings correct.

    I've added the remote database access hosts to WHM and cPanel but am not sure of the connection url that the jdbc client needs to access the database

    Is there ports I have to open in addition to the step above?
    Is there a way to get the required jdbc connection string for each database?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    What is the connection string you are trying currently for the connection? Of note, you'd need to connect to a database user and password for that database user. The database user must already existing in cPanel > MySQL databases area and must already be added to the MySQL database.
     
  3. mobcdi

    mobcdi Well-Known Member

    Joined:
    Jul 13, 2009
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    Had the database username & password created and had the connection string nearly correct but instead of jdbc:mysql://remoteserver/ I should have had jdbc:mysql://remoteserver/dbname

    The 1st url passed a basic connection test but didn't get to the database when it came time to actually interact with the database
     
Loading...

Share This Page