---
title: "报错The server time zone value 'ÖÐ¹ú±ê×¼Ê±¼ä' is unrecognized or represents more t"
author: "andrew7676"
date: "2019-02-17T12:22:40Z"
tags: []
categories: ["编程语言"]
slug: "the-server-time-zone-value-is-unrecognized-or-represents-more-t"
draft: false
lastmod: "2019-02-15T14:06:32Z"
id: 2437609
url: "https://andrew7676.iteye.com/blog/2437609"
---

```报错

mysql的时区错误问题： The server time zone value 'ÖÐ¹ú±ê×¼Ê±¼ä' is unrecognized or represents more than one

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/UserLoginMapper.xml
### The error may involve com.wj.mapper.UserLoginMapper.selectByName
### 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)

```



```解决方案

1. cmd打开，链接数据库
mysql -u root -p
Enter password:root

2. mysql> show variables like '%time_zone%';

3. mysql> set global time_zone='+8:00';

再次测试没有问题

```