2022 年 3 月 28 日2022 年 3 月 28 日 Java連線MySQL發生Public Key Retrieval is not allowed 解決方式: DB在連線字串中加入allowPublicKeyRetrieval=true和useSSL=false即可 jdbc:mysql://localhost:3306/my_db?useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true&useSSL=false