mybatis用域名连接数据库,出现连接池错误?
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
我之前改成localhost就行了
现在服务器跟数据库不在一个服务器
只能用域名连接
结果又出现了
回答:
mysql默认只能本机连接,需要改一下配置文件
以上是 mybatis用域名连接数据库,出现连接池错误? 的全部内容, 来源链接: utcz.com/p/177223.html