🐞[DB] Retrieval of t he RSA public Key is not enabled for insecure connections

 

 

[ 에러 ]

- " Retrieval of t he RSA public Key is not enabled for insecure connections "

 

[ 원인 ]

- Mysql 또는 MariaDB에서 TLS/SSL 없이 보안되지 않은 연결로 RSA public Key를 요청할 때 발생하는 오류 

 

[✨해결 ]

 

1. mySql Connection option에 "AllowPublicKeyRetrieval=True"를 추가 한다. 

string connectionString = "Server=myserver.com;Database=mydb;User=myuser;Password=mypassword;SslMode=None;AllowPublicKeyRetrieval=True;";

 

혹은

 

2. SslMode=Required를 추가 한다. 

string connectionString = "Server=myserver.com;Database=mydb;User=myuser;Password=mypassword;SslMode=Required;";