1. 程式人生 > >【JDBC】java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.

【JDBC】java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.

在使用阿里的druid 時,報了一個異常java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. 

貌似是時區問題,參考了這個部落格https://blog.csdn.net/u011702479/article/details/82118113

在druid.properties配置檔案中,的url的url=jdbc:mysql://localhost:3306/day19的後面加上?serverTimezone=GMT%2B8引數即可!