0

When im go to connect to my db i got this error, i try some fixes but nothing works i´m working with spring boot and java8

I try to find a propperty in spring appendix and doesent work i try some change in my application class and still broken

java.sql.SQLException: The server time zone value 'Hora estándar romance' 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.

there are my propperties

spring.banner.location=classpath:banner.txt
spring.banner.image.invert=false

spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/course
spring.datasource.username=root
spring.datasource.password=1111
spring.jpa.show-sql= true
spring.jpa.properties.hibermate.dialect=org.hibernate.dialect.MySQL8Dialect
Joshb
  • 3
  • 4
  • 1
    Please provide a [mcve], or read this: https://stackoverflow.com/questions/26515700/mysql-jdbc-driver-5-1-33-time-zone-issue – achAmháin Dec 06 '18 at 11:55
  • Try `spring.datasource.url=jdbc:mysql://localhost:3306/course?serverTimezone=CET` – rustyx Dec 06 '18 at 12:06

1 Answers1

0

try to add below parameters in spring.datasource.url

jdbc:mysql://localhost:3306/course?useLegacyDatetimeCode=false&serverTimezone=UTC

works with mysql-connector-java 6.0.4

Note : replace UTC with your wanted timezone

Alien
  • 15,141
  • 6
  • 37
  • 57