異常解決——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
- java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized...報錯解決JavaSQLExceptionServerZed
- Idea資料庫引入異常:java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognizedIdea資料庫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
- “Validation failed for one or more entities”異常的解決辦法AI
- More than one file was found with OS independent path
- Spark 異常:Trying to write more fields than contained in rowSparkAI
- 解決問題:Variable 'time_zone' can't be set to the value of 'NULL'Null
- android: ADB錯誤“more than one device and emulator”Androiddev
- Clock in a Linux Guest Runs More Slowly or Quickly Than Real TimeLinuxUI
- DNS: More than just namesDNS
- java.net.SocketTimeoutException: Read timed out異常解決方法JavaException
- Syntax error, unrecognized expression: li[value=]ErrorZedExpress
- Unrecognized Windows Sockets error: 0: JVM_Bind異常ZedWindowsErrorJVM
- oracle 10.2.0.1 emctl Timezone mismatch: The agentTZRegion value (US/Eastern)OracleAST
- RocketMQ的invokeSync call timeout異常的解決辦法MQ
- ORA-32021: parameter value longer than 255 characters 解決方法
- timestamp with local time zone型別和timestamp with time zone型別
- Dynamics CRM the field cannot be deleted because it is used in one or more process的解決方法delete
- Ionic異常及解決
- Android unspecified' depends on one or more Android Libraries but is a jar 的解決方法AndroidJAR
- 6、TIMESTAMP WITH TIME ZONE和TIMESTAMP WITH LOCAL TIME ZONE的實踐理解
- javaWeb常見異常的解決方法JavaWeb
- 解決 發生異常: RuntimeError (note: full exception trace is shown but execution is paused at: <module>)ErrorException
- Flutter異常監控 - 壹 | 從Zone說起Flutter
- “The last packet sent successfully to the server was 0 milliseconds ago. ”異常解決方案ASTServerGo
- flume file channel 異常解決
- Unknowncolumn'*'in'fieldlist'異常解決
- CentOS 常見異常及解決辦法CentOS
- java.sql.SQLException: Prepared or callable statement has more than 2000 parameter markers及解決方案JavaSQLException
- mysql The server quit without updating PID file異常解決辦法薦MySqlServerUI
- JavaScript getTimezoneOffset()JavaScript
- oracle time_zone!Oracle
- Oracle TimezoneOracle
- Excel匯入資料異常Cannot get a text value from a numeric cell解決辦法Excel