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.

Jdbc

Discussion in 'General Discussion' started by hugo24, Mar 14, 2003.

  1. hugo24

    hugo24 Well-Known Member

    Joined:
    Nov 16, 2002
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    My server has installed with Tomcat JSP. Does that means that database will support JDBC as well? I am not sure as it appears

    JDBC (may not be avalible)

    Here is what I retrieve from MYSQL manager.

    Connection Strings
    Perl $dbh = DBI->connect("DBI:mysql:cfanet_forums:localhost","cfanet_forums","<PASSWORD HERE>");
    PHP $dbh=mysql_connect ("localhost", "cfanet_forums", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ("cfanet_forums");
    JDBC (may not be avalible) <%@ page import="java.sql.*" %>
    Connection connection = null;
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    connection = DriverManager.getConnection(
    "jdbc:mysql://localhost/cfanet_forums?user=cfanet_forums&password=<PASSWORD HERE>");

    Thanks!
     

Share This Page