我正在使用教程中列出的 Hello World 示例测试 JWPL API:
但我收到以下 MySQL 连接异常:
02:11:31,057 信息 AbstractPoolBackedDataSource:462 - 初始化 c3p0 池... com.mchange.v2.c3p0.PoolBackedDataSource@f56923d7 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@76380f40 [acquireIncrement -> 3,acquireRetryAttempts - > 30,acquireRetryDelay -> 1000,autoCommitOnClose -> false,automaticTestTable -> null,breakAfterAcquireFailure -> false,checkoutTimeout -> 0,connectionCustomizerClassName -> null,
我安装了 MySQL 5.6.24,它运行正常。在我运行教程之前,我是否必须在 MySQL 中创建一些表来运行这些示例?
为清楚起见进行编辑:
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.GeneratedConstructorAccessor6.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:350)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2393)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor9.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)