Re: java.net.ConnectException: Connection Refused
Hi Rafel,
Thank you for taking the time to reply.
On the Mac, using Terminal, I'm running:
find / -name my.cnf (no results)
find / -name my.ini (no results)
find / -name my* (nothing that I could identify as a config file)
And yes, I'm using the following command from both an external Windows machine and the local Mac:
telnet [localhost or IP] 3306
which gives:
4.1.12-standard;rIRC6']!,(Hnu!>Wyz|~$
...which is the version of MySQL I'm running. Since I also get the prompt from the Windows computer, I believe it's working properly. I've tried reinstalling MySQL, no go.
If it will help, here's the connect statement in my code (it's the constructor of a class called "Database":
Database() {
try {
Class.forName(Environs.jdbc_driver).newInstance();
} catch (Exception e) {
System.out.println("Error Loading DB Driver: " + e.getMessage());
}
try {
conn = DriverManager.getConnection(Environs.jdbc_url);
} catch (SQLException e) {
System.out.println("SQLException: " + e.getMessage());
}
}
My JDBC url (Environs.jdbc_url, a static final String) looks like:
jdbc:mysql://localhost:3306/search?user=[user]&password=[password]
The code is dying at the SQLException: catch block, returning the previously posted error.
Subject
Written By
Posted
Re: java.net.ConnectException: Connection Refused
July 05, 2005 01:44PM
September 13, 2005 04:41AM
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.