MySql
create connection SQLException, url: jdbc:mysql:///test, errorCode 1045, state 28000
<! mysql 驱动 URL 变更写法 -->
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.cj.jdbc.Driver"></property>
<property name="url" value="jdbc:mysql:///test?serverTimezone=GMT"></property>
<property name="username" value="root"></property>
<property name="password" value="123456789"></property>
</bean>
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="com.mysql.cj.jdbc.Driver"></property>
<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/test?useSSL=false&serverTimezone=Hongkong&characterEncoding=utf-8&autoReconnect=true"></property>
<property name="user" value="root"></property>
<property name="password" value="lyp12345"></property>
<property name="initialPoolSize" value="10"></property>
<property name="minPoolSize" value="10"></property>
<property name="maxPoolSize" value="20"></property>
</bean>
c3p0-0.9.5.2
mchange-commons-java-0.2.15
mysql-connector-java-8.0.11
下载地址:
https://pan.baidu.com/s/1DeTy5gOvFrY4pFbsvObyMQ
提取码:ncel