異常解決——The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one
遇到這個問題,第一時間想到的是亂碼了,編碼格式問題,看了下資料庫的編碼設定都是正常UTF-8 。仔細看了下問題,才發現是時區問題。
解決方案:
我們們需要設定mysql的時區,因Mysql是裝在我本機電腦上,所以需要進入mysql的安裝bin目錄下去執行 mysql命令 。
開啟cmd管理員模式,進入到mysql的安裝目錄bin。
例如我的安裝目錄是:D:\Program Files (x86)\MySQL\MySQL Server 5.7\bin
執行以下命令登入mysql
mysql -hlocalhost -uroot -p
然後輸入root賬號的密碼。
輸入設定東八區時區命令,如下圖:
執行的命令如下:
show variables like '%time_zone%';
set global time_zone='+8:00';
重新執行程式,問題解決。 另外如果資料庫伺服器斷網過或者重啟過,就需要重新設定一下
相關文章
- JDBC:The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.JDBCServerZed
- mysql執行報The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one tim......MySqlServerZed
- java.sql.SQLException: The server time zone value ‘???ú±ê×??±??‘ is unrecognized or represents moreJavaSQLExceptionServerZed
- Idea資料庫引入異常:java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognizedIdea資料庫JavaSQLExceptionServerZed
- java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized...報錯解決JavaSQLExceptionServerZed
- spring boot 啟動時報錯The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized orJDBC driverSpring BootServerZedJDBC
- Java新增構造方法異常異常——Could not autowire. there is more than one bean of '' typeJava構造方法Bean
- 解決問題:Variable 'time_zone' can't be set to the value of 'NULL'Null
- More than one file was found with OS independent path
- 解決ERROR 1231 (42000): Variable 'time_zone' can'tError
- DNS: More than just namesDNS
- Android unspecified' depends on one or more Android Libraries but is a jar 的解決方法AndroidJAR
- Invalid time zone indicator ‘ ‘Indicator
- Syntax error, unrecognized expression: li[value=]ErrorZedExpress
- oracle time_zone(zt)Oracle
- OpenKruise 2021 規劃曝光:More than workloadsUI
- Dynamics CRM the field cannot be deleted because it is used in one or more process的解決方法delete
- “The last packet sent successfully to the server was 0 milliseconds ago. ”異常解決方案ASTServerGo
- Getting NOW() in your preferred time zone
- Flutter異常監控 - 壹 | 從Zone說起Flutter
- 備忘錄:SQL SERVER2014 出現:“Cannot find one or more components”SQLServer
- Ionic異常及解決
- Excel匯入資料異常Cannot get a text value from a numeric cell解決辦法Excel
- SpringCloud BeanCurrentlyInCreationException 異常解決方案SpringGCCloudBeanException
- Oracle的時區問題Time ZoneOracle
- CentOS 常見異常及解決辦法CentOS
- 時區提示:Local time zone must be set--see zic manual page 2018的解決辦法
- No bean named 'cacheManager' availablej 異常解決BeanAI
- auto assign ipv6 for more than /64 prefix, subnet for /112 #164
- 完美解決SqlServer2012啟動報錯(cannot find one or more components.Please reinstall the application。)SQLServerAPP
- [ABC311G] One More Grid Task
- java.sql.SQLException: No value specified for parameter 1 異常分析JavaSQLException
- 關於SpringMVC的HttpMediaTypeNotSupportedException異常解決SpringMVCHTTPException
- [持續更新]hive異常解決方案Hive
- SQL Server 異常程式碼處理SQLServer
- TIMESTAMP和TIMESTAMP WITH TIME ZONE之間的總結
- `jsonb` 報錯 `invalid input syntax for type timestamp with time zone ““JSON
- Tomcat常見異常及解決方案程式碼例項Tomcat