LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   jdbc mysql java - please help me (https://www.linuxquestions.org/questions/linux-software-2/jdbc-mysql-java-please-help-me-466014/)

j0hnd0e 07-20-2006 04:35 PM

jdbc mysql java - please help me
 
Hi all good people,

I using Debian, Mysql 4.1.15, tomcat 5.0.28, jdk 1.5.0_07

I need some help, I had upgrade my debian system and now tomcat doesn't work.
Configuration seems all OK, but it doesn't work.

I have done some further testing, some small applications to try connect to mysql using java and that doesn't work either.

What is relly interesting, I have installed all using the same procedure on Slackware and there is everything ok.

When I try to start Java application that should connect to mysql i always get:

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1934)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:483)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:992)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2568)
at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at data.fun(data.java:13)
at data.main(data.java:33)


** END NESTED EXCEPTION **



Last packet sent to the server was 47 ms ago.



I've done so many search using google, and had nothing found. Is there any solution to work this out, it's really important. I haven't sleep two days, trying to get thing work, and now my brain is overloaded. I have try almost everything.


Thank you very much

mrcheeks 07-21-2006 07:45 PM

Is the skip-networking line commented in the file /etc/mysql.cnf? Is the mysql jar library in the classpath(WEB-INF/lib in tomcat, classpath in your java ide or in the command line)?

j0hnd0e 07-22-2006 05:23 AM

Quote:

Originally Posted by mrcheeks
Is the skip-networking line commented in the file /etc/mysql.cnf? Is the mysql jar library in the classpath(WEB-INF/lib in tomcat, classpath in your java ide or in the command line)?

The problem was with MySQL debian package, I have compiled MySQL myself and everything works fine, this is allready twice that Debian update missed my system.
From now on I trust only my self :)

thanks


All times are GMT -5. The time now is 07:48 PM.