3 messages in com.mysql.lists.javaFW: MYSQL Connection issue , from XP BOX
FromSent OnAttachments
Daniel Varghese01 Oct 2004 05:48 
Alec...@Quantel.Com01 Oct 2004 06:00 
Thomas Lundström01 Oct 2004 06:12 
Subject:FW: MYSQL Connection issue , from XP BOX
From:Thomas Lundström (thom@ongame.com)
Date:10/01/2004 06:12:03 AM
List:com.mysql.lists.java

You can try your connection and possible firewall issues with telnet from an XP command prompt:

C:\>telnet mymachine 3306

This should produce an output with the version of you MySQL installation looking something like:

+ 4.0.20a-nt

P.S. Also, I always use: Class.forName("com.mysql.jdbc.Driver") for Connector/J D.S.

Regards,

-----Original Message----- From: Alec@Quantel.Com [mailto:Alec@Quantel.Com] Sent: den 1 oktober 2004 15:01 To: vdan@india.hp.com Cc: ja@lists.mysql.com Subject: Re: MYSQL Connection issue , from XP BOX

Looks to me like a firewall issur. All the components are in place, but Connector/J is not receiveing a reply from the remote MySQL. If you have a firewall in the way, you need to open port 3306. What OS is MySQL running on? If XP, and ypou have installed SP2, you have by default a firewall which must be opened up.

Alec

P.S. Connector/J 3.0.8 is a bit stale - I suggest getting latest.3.0.15

"Daniel Varghese" <vdan@india.hp.com> wrote on 01/10/2004 13:48:45:

HI Guys !

I'm trying to connect to a remote MYSQL DB (4.0.16-nt), using Java Program from a Windows XP using jdk1.4.2, I have both jtds-0.5.1.jar and mysql-connector-java-3.0.8-stable-bin.jar in the CLASSPATH,

My code snippet is looks like this

Class.forName("org.gjt.mm.mysql.Driver").newInstance(); conn = DriverManager.getConnection ("jdbc:mysql://mymachine:3306/MYDB","root","password");

I'm always getting the following ERROR , Please help me sort out this issue.

java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection timed out: connect at com.mysql.jdbc.Connection.createNewIO(Connection.java:1622) at com.mysql.jdbc.Connection.<init>(Connection.java:491) at

com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)

at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at com.hp.epod.util.sql.CreateTableUtil.DBConnect(CreateTableUtil.java:92) at

com.hp.epod.util.sql.CreateTableUtil.createTable(CreateTableUtil.java:113)

at com.hp.epod.util.sql.CreateTableUtil.main(CreateTableUtil.java:211)

Best Regards, Daniel Varghese Hewlett Packard -Global Delivery India Center 30C, Cunningham Road Bangalore - 560052, India DID : (91)(80) 2205 1798 Tel : (91)(80) 2225 1554 Email: vdan@india.hp.com dani@hp.com

Disclaimer: This e-mail, and any files transmitted with it are "HP Confidential" and intended solely for the use of the individual or entity to whom it is addressed. If you have received this e-mail in error, please discard the message and notify me directly.