在使用springboot整合ssm和druid的时候出现数据库一个问题

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: 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: Connections could not be acquired from the underlying database!
### The error may exist in com/wj/mapper/UserMapper.xml
### The error may involve com.wj.mapper.UserMapper.selectAllUserInfo
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
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.
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:127)
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95)
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:87)
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:61)
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:71)

出现这个问题时候,就是是数据库时间问题,然后执行了

SHOW VARIABLES LIKE '%time_zone%'

进行查询设置:

SET GLOBAL time_zone='+8:00'

然后就可以正常访问了

mysql的时区错误问题,The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one的更多相关文章

  1. Mysql错误:The server time zone value is unrecognized or represents more than one time zone

    方法1.修改Mysql的时区为东8区,执行如下命令即可: PS:这种方式每次开机都要配置的 set global time_zone='+8:00' 方法2.配置改成这样的 spring.dataso ...

  2. 【异常】The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.

    异常错误:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone ...

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

    Spring Boot JPA 使用Mysql是出现如下错误: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represe ...

  4. mysql的时区错误问题: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one

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

  5. 【问题解决:时区】连接MySQL时错误The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone

    问题描述: MySQL升级到8.0.11之后连接数据库报错: Your login attempt was not successful, try again. Reason: Could not g ...

  6. MySql数据库时区异常,java.sql.SQLException: The server time zone value '?й???׼ʱ?' is unrecognized or represents more than one time zone.

    JDBC访问MySql异常 Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException ...

  7. mysql 时区问题:The server time zone value '???ú±ê×??±??' is unrecognized

    org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.sql.SQLE ...

  8. spring boot 连接mysql 错误The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one

    1.spring boot 整合mybatis 连接mysql时错误 The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or repr ...

  9. 解决mysql时区与系统时区不一致问题。异常:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.

    异常信息:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone ...

随机推荐

  1. centos7使用frabric自动化部署LNMP

    1.创建lnmp.py文件 $ vim lnmp.py ------------------------> #!/usr/bin/env python from fabric.colors im ...

  2. sql2012增加Sequence对象

    官方给出了一大堆SQL2012相对于SQL2008R2的新特性,但是大多数对于普通开发人员来说都是浮云,根本用不到,下面就说说一些对于开发人员来说比较有用的新特性. Sequence对象对于Oracl ...

  3. GIT常用命令以及作用【备忘】

    git commit  提交一个修改 git branch branchName  新建一个branchName的分支 git merge branchName 将当前分支与branchName分支合 ...

  4. 关于CountDownLatch控制线程的执行顺序

    在上一篇文章中说过使用thread.join()方法.newSingleThreadExecutor单线程池来控制线程执行顺序.在文章的末尾我提出了一种构想,可否使用经典的生产者和消费者模型来控制执行 ...

  5. Mysql 设置外部访问

    mysql> use mysql; mysql> GRANT ALL ON *.* TO user@' WITH GRANT OPTION; mysql -h172. -uuser -p1 ...

  6. Opencv3 Mat对象构造函数与常用方法

    构造函数 Mat() Mat(int rows,int cols,int type) Mat(Size size,int type) Mat(int rows,int cols,int type,co ...

  7. 安装MySQLdb for Python3.7

    Python连接mysql数据库通过MySQLdb模块,在此记录我安装MySQLdb的过程. 一.系统环境 操作系统:Win7 64位 Python:Python 3.7 二.安装说明 A.如果Pyt ...

  8. 22.NULL 值

    NULL 值是遗漏的未知数据. 默认地,表的列可以存放 NULL 值. 本章讲解 IS NULL 和 IS NOT NULL 操作符. SQL NULL 值 如果表中的某个列是可选的,那么我们可以在不 ...

  9. mybatis 获得一个map的返回集合

    在使用mybatis 查询结果集,有时会有需求返回一个map比如表 id username 1  name1 2 name2 3 name3 希望的查询结果是一个map 并且以id为key  表为实体 ...

  10. .NET将服务器文件导出

    导出文件:                string filePath = Server.UrlDecode(filePath);                if (File.Exists(fi ...