Re: Can not connect to Mysql using jdbc on xp
Posted by: Naomi Blythe
Date: June 01, 2005 10:46PM

It is now using Connector/J 3.1.8. Below is the error message that I get. The line that is spitting out the error is the line "cnn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/prayerdiary?user=root&password=root");

****************************************

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

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused: connect

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused: connect
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1774)
at com.mysql.jdbc.Connection.<init>(Connection.java:437)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at PrayerDiary.<init>(PrayerDiary.java:37)
at PrayerDiary.main(PrayerDiary.java:57)


** END NESTED EXCEPTION **

**************************************************

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.