Home » DbVisualizer Forums » DbVisualizer » DbVisualizer - Support

Thread: Connection failure to MySql db


Permlink Replies: 7 - Pages: 1 - Last Post: Oct 24, 2008 11:51 PM Last Post By: Paul Maksym
AG

Posts: 4
Registered: 08/04/06
Connection failure to MySql db
Posted: Aug 4, 2006 9:49 PM
   thread.click_reply Reply
trying to connect to a db. get this

Product: DbVisualizer Free 5.0
Build: #1120 (2006/04/04 14:55)
Java VM: Java HotSpot(TM) Client VM
Java Version: 1.5.0_06-b05
Java Vendor: Sun Microsystems Inc.
OS Name: Windows XP
OS Arch: x86
OS Version: 5.1

An error occured while establishing the connection.
Type: com.mysql.jdbc.CommunicationsException Error Code: 0 SQL State: 08S01
Message:
Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection timed out: connect

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection timed out: connect
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2641)
at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.onseven.dbvis.wrapper.DriverManagerImpl.getConnection(Unknown Source)
at com.onseven.dbvis.sql.M.Į(Unknown Source)
at com.onseven.dbvis.sql.M.access$200(Unknown Source)
at com.onseven.dbvis.sql.M$A.execute(Unknown Source)
at se.pureit.util.ThreadCommand.runExecute(ThreadCommand.java:163)
at se.pureit.util.ThreadCommand.run(ThreadCommand.java:143)
at java.lang.Thread.run(Unknown Source)

** END NESTED EXCEPTION **


Last packet sent to the server was 0 ms ago.

driver is set properly.

Database url i am using
jdbc:mysql://<host>:<port3306>/<database>

so i'm doing something like
jdbc:mysql//localhost:3306/a2i

host is research.calit2.net

suggestions?

Roger Bjarevall


Posts: 5,172
Registered: 12/17/04
Re: Connection failure to MySql db
Posted: Aug 4, 2006 9:57 PM    global.in_response_to.tooltip in response to: AG
   thread.click_reply Reply
Hi,

If the host on which the MySQL database server is running is "research.calit2.net" then the URL should be:

jdbc:mysql://research.calit2.net:3306/a2i

(Note the extra colon after "mysql" which was not in your original URL).

What driver are you using? Can you telnet to the actual server i.e.:

telnet research.calit2.net 3306

Regards

Roger
AG

Posts: 4
Registered: 08/04/06
Re: Connection failure to MySql db
Posted: Aug 4, 2006 10:31 PM    global.in_response_to.tooltip in response to: Roger Bjarevall
   thread.click_reply Reply
tried jdbc:mysql://research.calit2.net:3306/a2i

still the same error.

i am able to telnet in . ie. it does set up a connection

i usually just ssh into the server

also i do have the extra colon after mysql when i try to connect. i missed it when i typed it in the post to you
AG

Posts: 4
Registered: 08/04/06
Re: Connection failure to MySql db
Posted: Aug 4, 2006 11:03 PM    global.in_response_to.tooltip in response to: Roger Bjarevall
   thread.click_reply Reply
i am using the MYSQL driver. i'm assuming it was set up properly since the MYSQL driver has a green check next to it
Roger Bjarevall


Posts: 5,172
Registered: 12/17/04
Re: Connection failure to MySql db
Posted: Aug 4, 2006 11:16 PM    global.in_response_to.tooltip in response to: AG
   thread.click_reply Reply
Hi,

Open Tools->Driver Manager, select the MySQL driver you are using. What does the Driver Class list show as the current class?

Regards

Roger
AG

Posts: 4
Registered: 08/04/06
Re: Connection failure to MySql db
Posted: Aug 4, 2006 11:56 PM    global.in_response_to.tooltip in response to: Roger Bjarevall
   thread.click_reply Reply
thanks for the quick response

Driver class: com.mysql.jdbc.Driver
Roger Bjarevall


Posts: 5,172
Registered: 12/17/04
Re: Connection failure to MySql db
Posted: Aug 5, 2006 8:27 AM    global.in_response_to.tooltip in response to: AG
   thread.click_reply Reply
Hi,

Thanks.

The error comes from the JDBC driver when it tries to setup the communication with the database. If telneting works fine then I cannot directly see what is wrong. Maybe you should check/ask in the MySQL J/Connector forums.

http://forums.mysql.com/list.php?39

Regards

Roger
Paul Maksym

Posts: 1
Registered: 10/24/08
Re: Connection failure to MySql db
Posted: Oct 24, 2008 11:51 PM    global.in_response_to.tooltip in response to: Roger Bjarevall
   thread.click_reply Reply
Hi

Sorry Roger but this is not true ;-) well - not entirely

I have hit this same problem last time. I'm using dbvisualizer for 6 months and this was the first time i have seen this error message. All other clients are working fine (both linux and windows). It is not a dbvis nor java problem.

Solution for this is to edit MY.CNF file and disable SKIP-NETWORKING in mysql server configuration file. Restart mysqld server and that's it ;)

Regards

Maksym

Point your RSS reader here for a feed of the latest messages in all forums