连接阿里云数据库Mysql出错
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 1 ms ago.
### The error may involve user.insertUser-Inline
### The error occurred while setting parameters
### SQL: insert into user(id,name) VALUES(?,?)
### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 1 ms ago.
; SQL []; Communications link failure
Last packet sent to the server was 1 ms ago.; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 1 ms ago.
Caused by:
org.springframework.dao.RecoverableDataAccessException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 1 ms ago.
### The error may involve user.insertUser-Inline
### The error occurred while setting parameters
### SQL: insert into user(id,name) VALUES(?,?)
### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 1 ms ago.
; SQL []; Communications link failure
Last packet sent to the server was 1 ms ago.; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
!!!!!!!!!!!!!!!!项目在本地Mysql连接正常!!!!!!!!!!!!!!!!!!
================================================================================================
myeclipse写的项目打成war包放在新浪云服务器上,第一次连接成功并插入数据。今天再试就报错了。一下是db.properties
使用spring+struts2+mybatis框架做的。
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://rds3tpv5o3c17115989y.mysql.rds.aliyuncs.com:3306/xawl
jdbc.username=kpj
jdbc.password=1234563
cpool.checkoutTimeout=5000
cpool.minPoolSize=20
cpool.maxPoolSize=50
cpool.maxIdleTime=7000
cpool.maxIdleTimeExcessConnections=1800
cpool.acquireIncrement=10
------------------------------------------------