Posts JAVA-MySQL 연동 시 Public key retrieval is not allowed 오류 해결법
Post
Cancel

JAVA-MySQL 연동 시 Public key retrieval is not allowed 오류 해결법

Public key retrieval is not allowed 오류 해결법

1
2
Exception in thread "main" 
java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed


MySQL 8.x 버전 이상에서 발생하는 문제로 위와 같은 오류가 발생한다.
이럴때 JDBC URL에 allowPublicKeyRetrieval=true&useSSL=false를 추가한다.

1
String url = "jdbc:mysql://localhost:3306/DB명?&useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&serverTimezone=UTC"
This post is licensed under CC BY 4.0 by the author.

Ubuntu apt-get 업데이트 중 The following packages have been kept back 오류 해결법

Mac에서 기본 Python 기본버전 설정하기

Comments powered by Disqus.