SSH连接MySQL时url这些参数一直报错是null
错误信息如下:
java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://null:null/null?useUnicode=yes&characterEncoding=utf8, username = null. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
这是我的spring配置文件节选:
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/carhartt" />
<property name="user" value="root" />
<property name="password" value="18544289" />
<property name="maxPoolSize" value="40" />
<property name="minPoolSize" value="1" />
<property name="initialPoolSize" value="1" />
<property name="maxIdleTime" value="20" />
</bean>