달력

7

« 2020/7 »

  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  •  


 

 

오류메시지

java.sql.SQLException: 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.

java.sql.SQLException: 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.

at

 

 

 

 

 

 

 

해결방법

MySQL 타임존의 시간표현 포맷이 달라 connector에서 인식을 하지 해서 발생합니다.

데이터베이스 경로 뒤에 ? 아래의 문자열을 추가해 줍니다.

Connection con = DriverManager.getConnection(

"jdbc:mysql://localhost/datadb?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC",

"root", "mysqlpw");

 

Connection con = DriverManager.getConnection(

"jdbc:mysql://localhost/datadb?serverTimezone=UTC",

"root", "mysqlpw");

 



Posted by codedragon codedragon

댓글을 달아 주세요