java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed

mysql8.x版本的数据库在连接的时候报错java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
只要在url的后边加上allowPublicKeyRetrieval=true即可

jdbc:mysql://localhost:3306/test?serverTimezone=GMT&allowPublicKeyRetrieval=true&useSSL=false&characterEncoding=utf-8;
java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowedjava.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed 锋霜利雪 发布了23 篇原创文章 · 获赞 12 · 访问量 3219 私信 关注
上一篇:1130, "Host 'xxxx' is not allowed to connect to this MySQL server"


下一篇:Leetcode1684. 统计一致字符串的数目[C++题解]:字符串O(n^2)简单题