Hi Mike,

I wrote the following to test the connection:
<snip>
java.sql.Connection conn = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
java.sql.DriverManager.getConnection("jdbc:mysql://localhost/prodacol?user=theusr&password=thepwd");
conn.createStatement().execute("Select * from Users");
conn.close();
</snip>

This give me:
<rootcause>
java.sql.SQLException: Cannot connect to MySQL server on
localhost:3306. Is there a MySQL server running on the machine/port you
are trying to connect to? (java.lang.NumberFormatException)
        com.mysql.jdbc.Connection.connectionInit(Unknown Source)
        com.mysql.jdbc.jdbc2.Connection.connectionInit(Unknown Source)
        com.mysql.jdbc.Driver.connect(Unknown Source)
        java.sql.DriverManager.getConnection(DriverManager.java:512)
        java.sql.DriverManager.getConnection(DriverManager.java:193)
        org.apache.jsp.jdbc_jsp._jspService(jdbc_jsp.java:76)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
</rootcause>

<mysql_log>
050823 20:54:00  mysqld started
050823 20:54:01  InnoDB: Started; log sequence number 0 43644
/usr/sbin/mysqld: ready for connections.
Version: '4.1.11'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
Source distribution
</mysql_log>

I've looked for msec, but I can't determine whether or not it's
running. I found a way to set the "Security Level" in Mandriva's
control centre - I set it to "low" and turned all I could see off.
Double-checked the firewall - it is off.

I'm still trying to figure out whether or not I'm using  a security
manager... I havn't changed anything in the default tomcat
installation, i.e. I havn't specified a security manager, so I don't
think I am using one... do you know how I would check?

Regards
Paul

Reply via email to