I've looked all over and tried everything I've been able to find on this so I'm making a post in case my issue is something strange.
MySQL workbench can use the server for queries and updates just fine. The notifier shows the server is running.
I've tried using Eclipse Juno and Kepler and got eclipse SQL State: 08S01 error 0. Zero packets were sent successfully and there was no response from the server. I redownloaded Connector/J to make sure there wasn't an error from a download hiccup. Didn't improve.
I changed to Netbeans to make sure it wasn't just Eclipse and something on my system. No successful packets sent and nothing received.
I tested to make sure the server was on and the correct port was being used by telnet in command prompt and as expected it asks for password input like it should. I used Wire Shark to see what the packet data looked like. It looked like the server was listening on the correct port and MySQL workbench was using the right port.
I'm at a loss for what is wrong. I even updated to Windows 7 to make sure it wasn't a driver authentication issue with Vista.
I used this code in NetBeans:
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class MySQLTest {
public static void main(String[] args)
{
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
System.out.println("1");
Connection con = DriverManager.getConnection("jdbc:mysql://127.0.0.0:3306/", "root", "wonderwoman");
System.out.println("2");
con.close();
System.out.println("We made it!");
} catch (SQLException ex) {
Logger.getLogger(MySQLTest.class.getName()).log(Level.SEVERE, null, ex);
} catch (ClassNotFoundException ex) {
Logger.getLogger(MySQLTest.class.getName()).log(Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
Logger.getLogger(MySQLTest.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
Logger.getLogger(MySQLTest.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
And eventually received this:
Oct 22, 2013 8:59:20 PM rad.MySQLTest main SEVERE: null com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1121)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:357)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2482)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2519)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2304)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:834)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at rad.MySQLTest.main(MySQLTest.java:21)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:241)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:259)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:307)
... 15 more
What else should I try? It looks like it's getting to the server and than everything is just bouncing off. I've turned off my firewall, I'm not using a proxy, kind of pulling my hair out here.