zoukankan      html  css  js  c++  java
  • mysql time zone时区的错误解决

    错误提示:

    The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone

    完整的错误提示:

    There was an unexpected error (type=Internal Server Error, status=500).
    nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is 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. ### The error may exist in file [D:XXXXDevJavaSSMMONTH_1901springboot-manage-master argetclassesmapperUserMapper.xml] ### The error may involve com.shop_manager.mapper.UserMapper.selectByNameAndPwd ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is 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.
     
    解决办法:

    cmd下输入如下命令进行操作

    //登录

    mysql -u root -p

     

    //查看mysql系统时间。和当前时间做对比

    select now();

     

    //查看系统时区

    show variables like '%time_zone%';

     

    // 设置时区,更改为东八区

    set global time_zone = '+8:00';

     

    // 刷新权限

    flush privileges;

     

     
     
    参考文章
     
  • 相关阅读:
    软件测试进程&测试类型
    课堂笔记:软件测试知识点汇总小结
    闰年测试程序
    关于 int.parse("abcd") 出错的问题分析及解决方案
    软件测试——字符串检测2.0
    边界值分析法实例分析
    测试管理
    软件评审
    单元测试与集成测试
    白盒测试
  • 原文地址:https://www.cnblogs.com/arxive/p/10332254.html
Copyright © 2011-2022 走看看