zoukankan      html  css  js  c++  java
  • java.sql.SQLException: The server time zone value is unrecognized or represents more than one time zone

    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.

    使用druid1.2.5和mysql8.0.20连接数据报以上错误信息,搜索得知

    https://blog.csdn.net/qq_43072399/article/details/103102934

    https://www.freesion.com/article/8764679361/

    需要在连接字符串后面加上useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai

    DruidPlugin dp = new DruidPlugin("jdbc:mysql://localhost/db_name?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai", "userName", "password");

  • 相关阅读:
    Pandas to_sql将DataFrame保存的数据库中
    Pandas 的groupby操作
    Hibernate(一)
    EasyUI
    Java面试题
    Solr
    Lucene
    SpringMVC(二)
    MyBatis(二)
    MyBatis(一)
  • 原文地址:https://www.cnblogs.com/zkwarrior/p/14441909.html
Copyright © 2011-2022 走看看