Hi!
I've been experiencing some problems regarding connection mysql/java. I'm
using a connector 3.0.8, and linux debian. I have also copied the connector
to JAVA_HOME/jre/lib/ext directory.
Here's is the code:
import java.sql.*;
public class DBTeste{
public static void main(String[] args) {
try {
Class.forName ("com.mysql.jdbc.Driver");
System.out.println("Driver JDBC loaded!");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql");
} catch (SQLException sqle) {
System.err.println("SQL Exception: " + sqle.getMessage());
} catch (Exception e) {
System.err.println("Exception: " + e.getMessage());
}
}
}
The error message I've got:
SQL Exception: Unable to connect to any hosts due to exception:
java.net.ConnectException: Connection refused
It's worth to remember that I'm able to enter in the db using a shell
command, without problems...
Could someone help me?
Thanks!
Gilmar
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]