当前位置: 代码迷 >> 综合 >> 问题处理-Z平台启动错误(The server time zone value ‘?й???????‘ is unrecognized or represents ....)
  详细解决方案

问题处理-Z平台启动错误(The server time zone value ‘?й???????‘ is unrecognized or represents ....)

热度:24   发布时间:2023-12-05 08:35:46.0

在Z平台启动过程中,如果发现如下错误:

Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Cannot create PoolableConnectionFactory (The server time zone value '?й???????' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.)

 该错误是使用MySQL8.0版本及以上版本数据库时,在连接URL中,未指定时区或时区错误导致的。

处理方法如下:

jdbc:mysql://IP地址:端口号/实例名?serverTimezone=GMT%2B8&useSSL=false

 

  相关解决方案