Exception in thread "main" java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecogn

问题:Exception in thread "main" 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.

Exception in thread

 serverTimezone=UTC”不然会因为时区问题报错

jdbc:mysql://localhost:3306/person?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
解决方法:url后面添加一部分
jdbc:mysql://127.0.0.1:3306/ssmdemo?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
 
 

你可能感兴趣的:(mysql)