java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼异常

报错java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼

第一个错误: Loading class com.mysql.jdbc.Driver’. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

把com.mysql.jdbc.Driver(这种已经弃用)改为com.mysql.cj.jdbc.Driver

第二个错误:java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one time

系统时区出现错误:
	解决方案:
		在配置mysql路径时加上?serverTimezone=UTC
         列:
		   jdbc:mysql://localhost:3306/eesy?serverTimezone=UTC
发布了323 篇原创文章 · 获赞 104 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/zsx1314lovezyf/article/details/105417400