zoukankan      html  css  js  c++  java
  • phpstorm使用mysql出现timezone问题

    2、使用JDBC连接MySql时出现: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

    Refer to

    解决方案:在连接字符串后面加上?serverTimezone=UTC

    其中UTC是统一标准世界时间。

    完整的连接字符串示例:jdbc:mysql://localhost:3306/test?serverTimezone=UTC

    或者还有另一种选择:jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8,这个是解决中文乱码输入问题,当然也可以和上面的一起结合:jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC

    jdbc:mysql://localhost:3306?serverTimezone=UTC

  • 相关阅读:
    C语言基础10
    swift笔记06
    C语言基础09
    C语言基础08
    C语言基础07
    C语言基础06
    swift笔记05
    Swift笔记4
    C语言基础05
    [转]一个清华计算机博士生的退学申请
  • 原文地址:https://www.cnblogs.com/fightforcoder/p/13476772.html
Copyright © 2011-2022 走看看