3 messages in com.mysql.lists.javamysql in java error connection
FromSent OnAttachments
SOF - Dragone Jose Luis05 Dec 2006 08:27 
Fabian Bieker05 Dec 2006 09:41 
public05 Dec 2006 09:51 
Subject:mysql in java error connection
From:SOF - Dragone Jose Luis (jdra@ext-sof.sba.com.ar)
Date:12/05/2006 08:27:26 AM
List:com.mysql.lists.java

Sorry if the answer is already in the archives but:

I have no idea on how to connect to MySQL 4.1.11 using java 1.5

I'm trying this way:

public static final String DRIVER = "com.mysql.jdbc.Driver"; // this one exist and is in : src/com/mysql/jdbc/Driver.java

public static final String URL_JDBC = "jdbc:mysql:host-ip-number:3306:databasename:username:password"; // I think the problem is here

public MySQLDAOFactory() {

try {

Class.forName(DRIVER);

} catch (ClassNotFoundException e) {

System.err.println("DRIVER not loaded");

e.printStackTrace();

....

public static Connection createConnection() throws SQLException {

return DriverManager.getConnection(URL_JDBC);

BUT I GET this ERROR in DEBUG

insercionjava.sql.SQLException: No suitable driver

at java.sql.DriverManager.getConnection(DriverManager.java:545)

at java.sql.DriverManager.getConnection(DriverManager.java:193)

at dao.MySQLDAOFactory.createConnection(MySQLDAOFactory.java:28)

at dao.MySQLPersonaDAO.insertarPersona(MySQLPersonaDAO.java:11)

at dao.InsertarDatosPersonales.insertarFila(InsertarDatosPersonales.java:62)

at dao.InsertarDatosPersonales.actionPerformed(InsertarDatosPersonales.java:72)

thanks

Jose