mysql8.0连接时报错:java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized
程序员文章站
2024-03-12 21:12:02
...
mysql8.0连接时报错:java.sql.SQLException: The server time zone value ‘�й���ʱ��’ is unrecognized or represents more than one time zone解决方法
1.出现这种情况的原因是因为mysql的jar包时区与本地时区不一致所致;
解决方法:将mysql的时区设置成我们本地时区就可以解决
在Navicat或者dos窗口下执行sql命令:set global time_zone=’+8:00’;设置一下数据库的时区即可
(中国为中8区,所以设置为+8:00)
set global time_zone='+8:00';
2.设置完成之后再连接数据库,结果成功
推荐阅读
-
mysql8.0连接时报错:java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized
-
解决MySQL报错The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents .
-
SpringBoot连接MySQL8.0报错:-The Server time zone value ‘�й���ʱ��’ is unrecognized or represents more
-
对于使用JDBC连接mysql数据时The server time zone value '¤¤°ê¼Ð·Ç®É¶¡'...的异常问题解决。
-
JDBC:Exception in thread “main“ java.sql.SQLException: The server time zone value ‘�й���ʱ�报错
-
java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized o
-
连接mysql数据库报错java.sql.SQLException: The server time zone value '�й���ʱ��'
-
java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized o
-
SpringBoot连接MySQL8.0报错:-The Server time zone value ‘�й���ʱ��’ is unrecognized or represents more
-
对于使用JDBC连接mysql数据时The server time zone value '¤¤°ê¼Ð·Ç®É¶¡'...的异常问题解决。