DBeaver连接 MySQL 8.x 版本时遇见的问题
问题:Public Key Retrieval is not allowed
连接时出现以下错误:
Public Key Retrieval is not allowed
解决办法
在驱动属性里设置 allowPublicKeyRetrieval
的值为 TRUE
步骤:
- 右键MySQL,选择“编辑连接”
- 选择“驱动配置”,右边在“驱动属性”中找到
allowPublicKeyRetrieval
并将值改为TRUE
- 点击确定
问题:The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or…
连接时出现以下错误:
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 utili
解决办法
出现这种问题可能是时区的问题,因此只要把时区改为当前系统时区即可。在MySQL 8.0 Command Line Client - Unicode或者在MySQL 8.0 Command Line Client工具中用root用户登录MySQL,然后执行以下命令:
show variables like '%time_zone%';
set global time_zone='+8:00';
设置时区
步骤:
-
打开搜索框中直接输入“
Command Line Client
”进行搜 索,找到MySQL 8.0 Command
Line Client - Unicode或者MySQL 8.0 Command Line
Client工具,并用管理员身份运行。
-
输入root账户的登录密码
-
分别输入
show variables like '%time_zone%';
和set global time_zone='+8:00';