Cannot Connect to Localhost?
843854Jul 10 2005 — edited Jul 10 2005I have setup MySQL server on my computer and i am using JDBC for my Java application to connect to it but it doesn't allow me to. The error message is
==================================
java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
==================================
details of the connection information are
private String url = "jdbc:mysql://localhost:3306/saloneasy";
private String driverName = "com.mysql.jdbc.Driver";
private String username = "root";
Class.forName(driverName);
connection = DriverManager.getConnection(url, username, password);
statement = connection.createStatement();
The JDBC drivers are being found, the code can attempt to access a mysql database running on a different computer, up to now access is denied, but the error message i am getting implies that the server isn't even running.
Both mysql > status; and MySQL Admin tool show the server to be running.
Any ideas?
The code i am using has worked in the past but i just cannot get this to work at the moment.
Dave