- This topic has 5 replies, 2 voices, and was last updated 20 years, 3 months ago by Riyad Kalla.
-
AuthorPosts
-
arnorMemberHi to all,
I have installed 3.8 on my suse 9.1 with sun 1.4.2 vm and I exploring it
my first nice problem:
When I try a jdbc connection with Mysql driver I get this exception:
!ENTRY com.genuitec.eclipse.sqlexplorer 4 4 Aug 17, 2004 10:38:07.172
!MESSAGE Error logging to database
!STACK 0
java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused** BEGIN NESTED EXCEPTION **
java.net.ConnectException
MESSAGE: Connection refusedSTACKTRACE:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:121)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:220)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1768)
at com.mysql.jdbc.Connection.<init>(Connection.java:440)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:99)
at com.genuitec.eclipse.sqlexplorer.LoggingProgress.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)** END NESTED EXCEPTION **
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1836)
at com.mysql.jdbc.Connection.<init>(Connection.java:440)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:99)
at com.genuitec.eclipse.sqlexplorer.LoggingProgress.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)I can connect to mysql with apache/php (phpMyAdmin) and also with java datasource (jrun4).
Any Idea?tks in advance
Lorenzo
Riyad KallaMemberIs your connection string correct? Are you using the same account to connect that those other resources use? What version of COnnector/J are you using? What version is the DBMS?
arnorMembermy connection setting in myeclipse:
jdbc:mysql://localhost:3306/croxit
user:root
pswd:in jrun-resource.xml
<data-source>
<dbname>ds_croxit</dbname>
<driver>org.gjt.mm.mysql.Driver</driver>
<url>jdbc:mysql://127.0.0.1:3306/croxit</url>
<username>root</username>
<password />I use mysql-connector-java-3.0.14-production-bin
the dbms is mysql MySQL 4.0.18-MaxRegards Lorenzo.
ps. I go in holiday today for a week. More feedback next week ^_^
Riyad KallaMemberLorenzo,
I noticed that the nested exception is a NewIO problem creating the connection, in the README for the driver they have a list of the arguments the drive can take, one of them can disable using Java 1.4s NIO library, try and disable that and see if it connects. If it doesn’t and you still get a connection refused, then there is likely something wrong with your local setup or permissions.
arnorMemberI solved the problem.
I have changed “localhost” with 127.0.0.1very strange because “ping localhost” it work fine
Regards Lorenzo
Riyad KallaMemberThat is a odd one… I’m glad you figured it out and thanks for posting back here for other users.
-
AuthorPosts