MySQL8 提示Public Key Retrieval is not allowed
在使用jdbc连接到mysql时:
因为使用了 sha256_password 认证,我们可以在连接数据库的配置文件中加上allowPublicKeyRetrieval=true
url: jdbc:mysql://127.0.0.1:3306/xxxx?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true