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!

 解決方法:

設置東八區

set global time_zone='+8:00';

完美解決。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章