在连接数据库的url中,加上allowPublicKeyRetrieval=true
from:https://blog.csdn.net/Gushiyuta/article/details/93239648