[求助]eclipse + mysql 连接不上问题
我mysql装的是5.0,在引入包中mysql-connector-java-5.0.8-bin.jar后,新建mysql数据库,用户名,密码都正确连接不上,提示
Could not connect to db.
Error creating SQL Model Connection connection to db. (Error: Unknown database 'database')
Unknown database 'database'
Error creating JDBC Connection connection to db. (Error: Unknown database 'database')
Unknown database 'database'
ping数据库
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown database 'database'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3421)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1247)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2775)
at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at org.eclipse.datatools.connectivity.db.generic.JDBCConnection.createConnection(JDBCConnection.java:87)
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:104)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53)
at org.eclipse.datatools.connectivity.db.generic.JDBCConnectionFactory.createConnection(JDBCConnectionFactory.java:52)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:77)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:354)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:57)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
那位高手帮我看下,谢谢了
[[it] 本帖最后由 zjh001 于 2008-4-3 23:04 编辑 [/it]]