我是靠谱客的博主 满意大碗,这篇文章主要介绍idea连接数据库报时区错误,现在分享给大家,希望可以做个参考。

idea连接数据库报错误:
com.mysql.cj.exceptions.InvalidConnectionAttributeException: 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.

解决步骤

  1. 进入MySQL
    命令提示符进入mysql :mysql>mysql -u用户名 -p密码;

  2. 更改时区
    mysql> show variables like “%time_zone%”;
    在这里插入图片描述
    mysql> set global time_zone=’+8:00’;
    在这里插入图片描述

  3. 退出数据库重新进入
    mysql> show variables like “%time_zone%”;
    在这里插入图片描述
    更改完成啦!!!

最后

以上就是满意大碗最近收集整理的关于idea连接数据库报时区错误的全部内容,更多相关idea连接数据库报时区错误内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(116)

评论列表共有 0 条评论

立即
投稿
返回
顶部