错误信息:
HTTP Status 500 – Internal Server Error
Type Exception Report
Message Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Mysql版本信息:
pom.xml中的jdbc驱动版本:
JDBC连接语句:
总结:
Mysql 8应用对应的驱动并配置带有时区参数的JDBC语句方能正常连接数据库。