1 Reply Latest reply on Mar 7, 2003 7:32 AM by Nicolai R. Axelsen

    Problem connecting to mySQL - please help

    Nicolai R. Axelsen Newbie

      I am trying to get a connection to mySQL. I have installed JBoss 3.0.6 w/Tomcat 4.1 and mySQL 3.23.

      I am new to appservers and really don't know how to set up the connection. I have tried reading the readme file from mysql, tutorials from apache etc, but it does not seem to work.

      JBoss/Tomcat are installed in a directory called jboss_tomcat, and mySQL in a directory called mysql. The JDK used is version 1.4. I have put the mysql-connector-java-2.0.14-bin.jar file in the jre/lib/ext directory of the jdk used, in tomcat/server/lib and in the web-inf directory on the webapp/root dir (where my jsp is) in tomcat, nothing seem to help.

      I try to start up tomcat and then I make a jsp which (tries to) connect to a database named nbdtest, with table user. The following is my connection code:
      java.sql.Connection conn;
      java.sql.Statement stmt = null;
      java.sql.ResultSet rs = null;


      conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/nbdtest");

      I would be very happy if someone could help me with this problem.