共计 534 个字符,预计需要花费 2 分钟才能阅读完成。
完整错误如下
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:服务器时区值 ’ й ‘ 无法识别或代表多个时区。如果要使用时区支持,则必须配置服务器或 JDBC 驱动程序(通过 serverTimezone 配置属性)以使用更具体的时区值。
解决方法:修改 MySQ 的 L 时区
打开 cmd 进去 MySQL,输入下面 4 行代码即可
select curtime(); ## 查看 MySQL 当前时间,当前时区
set global time_zone = '+8:00'; ## 修改 MySQL 全局时区为东 8 区的北京时间
set time_zone = '+8:00'; ## 修改当前会话时区
flush privileges; ## 立即生效

正文完
发表至: 系统运维
2019-08-01