鏈接 MySQL 8.x 版本報錯解決

在使用DBeaver鏈接 MySQL 8.x 版本時碰見了兩個問題,經過查詢找到了解決方案,記錄一下:mysql

問題

問題一

Public Key Retrieval is not allowedsql

解決

在驅動屬性裏設置 allowPublicKeyRetrieval 的值爲 truespa

clipboard.png

問題二

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 utilicode

解決

經過上面的報錯信息能夠發現是時區的問題,所以只要把時區改成當前系統時區便可。使用root用戶登陸mysql,而後執行如下命令:server

  1. show variables like '%time_zone%';
  2. set global time_zone='+8:00'; 設置爲北京時區
相關文章
相關標籤/搜索