Public Key Retrieval is not allowed报错
解决办法:
在链接里面加入allowPublicKeyRetrieval=true
注意开头a小写
示例:
static {
try {
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/hyy_crm?useSSL=false&characterEncoding=utf8&serverTimezone=UTC&allowPublicKeyRetrieval=true", "root", "123456");
} catch (Exception e) {
e.printStackTrace();
}
}