DBeaver连接 MySQL 8.x 版本时遇见的问题

问题:Public Key Retrieval is not allowed

连接时出现以下错误:

Public Key Retrieval is not allowed

解决办法

在驱动属性里设置 allowPublicKeyRetrieval 的值为 TRUE

步骤:

  1. 右键MySQL,选择“编辑连接
    在这里插入图片描述
  2. 选择“驱动配置”,右边在“驱动属性”中找到 allowPublicKeyRetrieval并将值改为TRUE
    在这里插入图片描述
  3. 点击确定

问题: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,然后执行以下命令:

  1. show variables like '%time_zone%';
  2. set global time_zone='+8:00'; 设置时区

步骤:

  1. 打开搜索框中直接输入“Command Line Client”进行搜 索,找到MySQL 8.0 Command
    Line Client - Unicode
    或者MySQL 8.0 Command Line
    Client
    工具,并用管理员身份运行。
    在这里插入图片描述

  2. 输入root账户的登录密码
    在这里插入图片描述

  3. 分别输入 show variables like '%time_zone%';set global time_zone='+8:00';
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/u013611126/article/details/94399223