Public Key Retrieval is not allowed 오류

MySQL 8.0 이후 DBeaver로 DB에 접속하려고 하면 Public Key Retrieval is not allowed 라는 오류가 발생한다.

MySQL 8.0부터는 allowPublicKeyRetrival = true 설정을 추가로 해주어야 한다. 

jdbc에서도 마찬가지이다.

jdbc:mysql://localhost:3306/db?allowPublicKeyRetrieval=true&useSSL=false

 

DBeaver에서의 설정은 아래와 같다.

 

Mysql DB를 선택하고 Edit Connection으로 들어간다.

Driver properties 탭에 들어가서 AllowPublicKeyRetrieval 항목을 True로 수정한다.

 

 

다시 접속을 시도하면 정상접속됨을 확인할 수 있다.

 

 

출처 : 스택오버플로우

https://stackoverflow.com/questions/50379839/connection-java-mysql-public-key-retrieval-is-not-allowed