Mailinglisten-Archive |
Hi,
ich habe ein Problem mit MySQL 4.1.1, wenn ich versuche per JDBC mit
Connector/J 3.0.9 zuzugreifen.
import java.sql.*;
public class ConnectionTest
{
public ConnectionTest()
{
Connection con= null;
try {
Class.forName("com.mysql.jdbc.Driver");
} catch ( ClassNotFoundException e ) {
System.err.println("ConnectingError.DriverNotFound "
+ e.getMessage());
}
String dburl="jdbc:mysql://localhost/mysql";
try {
con= DriverManager.getConnection(dburl,"dummy", "");
} catch ( Exception e ) {
System.err.print( "ConnectingError.ConnectingFailed ");
e.printStackTrace();
}
}
public static void main(String argv[])
{
ConnectionTest con = new ConnectionTest();
}
}
Das Ganze wird dann bei mir abgebrochen mit
ConnectingError.ConnectingFailed java.sql.SQLException: Syntax error or
access violation, message from server: "Unknown database '+bl7m'"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1825)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1752)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2251)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:695)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1734)
at com.mysql.jdbc.Connection.<init>(Connection.java:562)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:361)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at ConnectionTest.<init>(ConnectionTest.java:16)
at ConnectionTest.main(ConnectionTest.java:27)
wobei der Datenbankname sich von mal zu mal aendert. Leider habe ich
bisher auch keine Hinweis gefunden woran es liegen kann.
Mit Connector/J 2.0.11 funktioniert es aber, nicht aber mehr mit
Connector/J 2.0.14, wobei dort eine NumberFormatException auftaucht
Kennt jemand ein aehnliches Problem und weiss eine Loesung?
tschau
--
Software-Tomography - we make the invisible visible!
Jan Kuehl
Software-Tomography GmbH
Karlstr.7
D-03044 Cottbus
e-Mail: jan.kuehl at software-tomography.com
http://www.software-tomography.com
Phone: +49 (0355) 4945077
----------------------------
--
Infos zur Mailingliste, zur Teilnahme und zum An- und Abmelden unter
-->> http://www.4t2.com/mysql
php::bar PHP Wiki - Listenarchive